Home  Article

Sep 4 2019

MCU Guide: The Basic Knowledge Of MCU


What Can MCU Do?
MCU Structure
MCS51 And 8051 Relationship
8051 Microcontroller Pins Introduction
VMicroprocessor(MP) And Microcontroller(MCU) 
VIHow The MCU Works?

1. What Can MCU Do?

At present, microcontroller permeates into every field of our life. It is almost difficult to find the trace of microcontroller in any field. Small phones, toys, mobile phones, all kinds of card readers, computer keyboards, color TV sets, refrigerators, air conditioners, induction cookers, cars, industrial automatic control, robots, missile navigation devices, and even American rovers, all of these devices contain one or more single chip microcomputer. The number of microcontroller is not only far more than PC, even more than the number of human beings.

MCU Applications 

MCU Application—figure from vlsifacts.com

2. MCU Structure

There are several parts on a working computer: CPU (for computing, control), RAM (data storage - memory), ROM (program storage), I/O devices (such as: serial port, parallel output port, etc.). On a personal computer these parts are divided into several chips and mounted on a printed circuit board called a motherboard. But in the single chip, these parts, are all done in an integrated circuit chip, so called single chip.

MCU is a kind of control chip, a micro computer, it can form a MCU system with crystal oscillator, memory, address latch, logic gate, seven-segment decoder (display), button (like keyboard), expansion chip, interface and other components.

Somebody must have a question about it that the CPU in PC is expensive, aren’t the MCU combined by such several parts more expensive? The answer is NO! Actually, for some series MCU, like 8051, their price range from $1 to dozens of dollars . Surprise!

3. MCS51 And 8051 Relationship

MCS51 refers to a series of MCU produced by INTEL corporation of the United Statesthis series of single-chip microcomputer includes many varieties, such as 80318051,87518032,80528752, among that 8051which is developed by Intel in the 1980s, is the earliest one of the most typical product. This series of other MCU is conducted on the basis of 8051 function, so people used to call MCS51 series single chip microcomputer 8051. There is a large production and mature technology of 8051 chip,and 8051 is the most common used microcontroller nowadays so it is perfect for newbies.

4. 8051 Microcontroller Pins Introduction

MCU Pin Introduction 

MCU Pin Introduction—figure from pinterest.com

As figure shown above, there are 40 pins on 8051 MCU and they can be roughly divided into 4 categories: power supply, clock, control and I/O pins.

  • Power Supply

GND: pin 20, the ground pin that connects to the power negative pole.

Vcc: pin 40, the power pin that needs 5V.

  • Clock

XTAL1, XTAL2 - inverting input and output end of crystal oscillator circuit.

  • Control Pin

RST: pin 9, the reset pin. The controller will be reset by holding RST HIGH for at least two machine cycles.

PSEN: pin 29, external ROM read communication signal.

ALE/PORG: pin 30, Address Latch Enable/On - chip EPROM programming pulse. ALE is used to lock the low 8 bit address sent out of by P0 port, PROG is used to input a programming pulse during the EPROM programming.

  • I/O Pins

8051 has four 8-bit parallel I/O ports: P0, P1, P2, P3, and a total of 32 pins. P3 port also has the second function for special signal input/output and control signals (belonging to the control bus)


I/O Pins Fuction Introduction—figure from theengineeringprojects.com 

5. Microprocessor(MP) And Microcontroller(MCU)

The terms microprocessor and microcontroller have always been confused with each other. MP is a general purpose device called as CPU, whereas MCU is a dedicated chip which is called as single chip computer. As mentioned above, MCU consists of CPU, RAM, ROM, I/O ports, counters and timer. MP is one part of MCU. But microcontrollers are designed to perform specific tasks. Specific means applications where the relationship of input and output is defined. Since the applications are very specific, the resources like RAM, ROM, I/O ports etc they need are small and hence can be embedded on a single chip. This in turn reduces the size and the cost. And MP, used as a CPU on computer, it performs complex tasks,  like developing software, games, websites, photo editing, creating documents etc. In such cases the relationship between input and output is not defined. They need high amount of resources like RAM, ROM, I/O ports etc. The MCU operates from a few MHZ to 30 to 60MHZ, but the MP nowadays operates above 1GHZ. Hence you also can see the reason why MCU is cheaper than the MP(CPU).

6. How the MCU works?

If you want to use a chip, you have to know how to wire it up.

8051 circuit diagram

8051 cricuit diagram

Power supply: MCU uses a 5V power supply, where the positive pole connected to 40 pins, the negative pole (ground) connected to 20 pins.

Pine-vibrating circuit: MCU is a kind of sequential circuit, which must supply pulse signal to work normally. In the microcomputer internal has integrated the oscillator, using crystal oscillator, connect pin 18, 19.

Reset pin: connect the lines as shown above.

Pin EA: pin EA is connected to the positive power supply end. The single chip began to work when the power is on.

How to light up an LED with the MCU? Obviously, this LED must be connected to one of the pins of the single chip microcomputer, otherwise the single chip microcomputer cannot control it. We connect this LED to pin 1, P1.0. When the pin is high level, the LED will not be bright, only when the pin is low level, the LED will be bright.

How to make it 'high' or 'low'? In order for the computer to do things, you must give commands to the computer. The commands that the computer can understand are called computer commands. The instruction that makes a pin output high level is SETB, and the instruction that makes a pin output low level is CLR. So, if we want P1.0 to output high, we just set SETB P1.0, and if we want P1.0 to output low, we just set CLR P1.0.

The computer commands are already gotten. But as we all know, the computer only recognizes numbers, hence it’s neccesary to traslate the commands into numbers, SETB P1.0 —> (D2H,90H), CLR P1.0 —>(C2H,90H ). Then, you need a programming device to let the numbers get into the MCU internal. The programming device is a tool to burn the code you write on a computer into the MCU EPROM by the target generated by a compiler, such as an assembler.

7. The END

8051, this type of single-chip microcomputer programming is a very troublesome thing, it is necessary to install the programmer firstly and programming then you can use it in the equipment. With the rapidly development of MCU, some microcontrollers like AT89S51 and STC89C51 can support online programming (isp) function, without pulling out and using simple circuit can achieve the code into the microcontroller internal.

You May Also Like

FPGA And W3150A+ Have Been Choosen To Design The Ethernet Interface
XC5VLX85-1FF676I Datasheet PDF – IC FPGA 440 I/O 676FCBGA Xilinx Inc.

XC4VFX100-10FFG1152C Datasheet PDF – FPGA Virtex®-4 FX Family 94896 Cells 90nm (CMOS) Technology 1.2V 1152-Pin FC-BGA

0 comment

Leave a Reply

Your email address will not be published.