8051 Block & Pin Diagram

on Thursday, 12 September 2013
It is necessary to learn Assembly level programming before moving to the high level programming like C language. It is because by working hands on assembly level programming we can know

  • Architecture of the microcontroller 
  • We will get the idea of internal registers and its working 
  • How actually the data is moved from one register to other and its  manipulations
  • We will get bright idea of the logic which is happening inside the microcontroller
Many people says that it is not necessary to learn assembly level in order to deal with Embedded C language, i agree with them as well disagree too. In order to do microcontroller projects based on C it is not necessary to learn assembly level programming but it is preferable. If a person who code using C language he will not understand what's going on inside the microcontroller. If we know assembly language then our mind will think in the same way, so it will be easy for us when we write code using C language.

So, without wasting much time, lets drive into it...


Architecture of 8051

Look at the block diagram of 8051 above, it is no need to explain each block because it is self explanatory but lets see all blocks one by one with brief explanation.

Oscillator: It generates the oscillations(clk signal) to the microcontroller, to explain exactly its use, its similar to the "heart beat for a human body". The speed (execution of instructions) is depended upon the oscillator. i.e a 10Mhz crystal oscillator perform execution of instructions more faster than the 4Mhz crystal oscillator.

I/O Ports: We have 4 I/O ports i.e p0 to p3, they are used for Input and Output operations.

Serial Ports: serial port(tx and rx) are used to receive or send data serially.

Timers/CountersWe have 2 Timers/Counters. Timers are used to produce a time delay(example we want to ON and OFF led for every 2sec in this case timers are used) .Counters are used to count the number of events. In fact both Timers and Counters use the same registers. You will know soon...

Memory: RAM and ROM are inbuilt in the chip(8051 mc) . RAM(Random Access Memory) it is used to store data temporary and ROM is to store data permanently. Our program will be saved in ROM because even after power is off we need not to loose data.

Interrupts: We have two hardware interrupts. You will see soon in further posts.


Features of 8051

Pin Diagram:

pin diagram 8051

Observe the above Pin Diagram, it consists of four Input/Output ports i.e P0, P1, P2, P3.
  • Port0  is from 32 to 39th pins
  • Port1 is from 1 to 8th pins
  • Port2 is from 21 to 28 pins
  • Port3 is from 10 to 17 pins
Pins 18 and 19 is used to connect crystal oscillator, pins 10 and 11 are used for Rx and Tx for serial communication, pins 12 and 13 are interrupt pins, 14 and 15 are timer pins and 16,17 for WR and RD pins respectively..

Be clear with theory first, soon as we do simple programming then you will understand each and everything clearly. So, dont worry everything will be easy... 



Tulasiram Manchikanti said...

What is difference b/w Tx and WR both sends data?


Tx, Rx are used for the serial communication i.e Tx is for the sending data and Rx is used for the receiving data

Tulasiram Manchikanti said...

I know functionality of Tx, RX.

What is difference b/w Tx, "WR" both are to send data right.......

Anonymous said...

Tx is used to transmit data serially
wr is to send a write signal to MC

Deyan Simeonov said...

The HUMANOID robotic ARM using pic microcontroller The purpose of the HUMANOID robotic ARM project is to implement the position control and vision control on the robotic arm. Which in my opinion is one of the best things happening and even KLDS and http://microcontrollerslab.com/ talked about this.

Post a Comment