8051 Features

  • 8 bit based Central Processing Unit
  • In-build Clock circuit and Oscillators
  • 32 bit I/O lines
  • 64Kb External data memory, 64Kb external program  memory
  • Two 16bit Timer/Counter
  • Five interrupt based on two priority
  • Full duplex serial port
  • P0-port does not have pull-up resistor.
  • Harvard architecture
  • CISC


8051 Block Diagram


  •  8 bit register also called as A regiester or Acc register

B- Register

  • Its moslt using Multiply and division operations

Program Status Word (PSW)

  • This is Special function  register, can also address bit or byte method
  • It contains the programming status.
  • It is mainly using for select the particular register bank form four register banks

Stack Pointer

  • 8 bit Special function register.
  • Stack may be in any location of On chip memory of RAM
  • Stack pointer values will increment when execute the PUSH and CALL instructions

Data Pointer

  • 16 Bit register (DPH-8bit and DPL-8bit)


I/O Ports 0-3 Latch and Drivers

Four different I/O Ports(P0,P1,P2,P3.

  • Each Port have 8 pins (32 pins).
  • All port pins are working Bi-directional method.
  • Each Ports are contains separate Latch, Output Driver and Input Buffer.
  • Port Pin as a INPUT Mode
    • pin = 1 (input) //define
  • Port Pin as a OUTPUT Mode
    • pin = 0 (output) //define

Serial Data Buffer

  • It contains Two buffer register
  • Transmit buffer register
    • parallel in serial out
  • Receiver buffer  registers
    • serial in parallel out

Timer register

  • It has Two 16 bit registers namely TH0, TL0 and TH1, TL1
  • Its mainly using for choosing timer and counter

Timer 0 and Timer 1 interrupts are generated by the timer register bits TF0 and TF1 Selecting the timer by configuring TMOD register and its mode of operation. Choosing and loading the initial values of TLx and THx for appropriate modes. Enabling the IE registers and corresponding timer bit in it. Setting the timer run bit to start the timer. Writing the subroutine for the timer for time required and clear timer value TRx at the end of subroutine.

Control Registers

  • IP
  • IE
  • TMOD
  • TCON
  • SCON
  • PCON

Timer and Control Unit

  • It gives all timing and control of micro-controller


  • Its using for generate a signal for controller

Instruction register

  • This  decode the next execute instruction’s op-code

EPROM and Program address register

RAM Address registers


SFR Register Banks

8051 Pin Diagram


  • Vcc – +5v supply Voltage.
  • Vss – Ground Pin
  • Reset – Using for reset the micro-controller

EA(Bar) /Vp-p

  • High – Accessing Internal Program Memory
  • Low  – Accessing External Program Memory

Note :Should gives 21volts DC supply, while programming EPROM .in Internal

XTAL1 and XTAL2 – Using Crystal Oscillator

Types of Memory

  • Code Memory
  • Internal RAM
  • External RASM
  • Special Function Registers(SFRs)
  • Bit Memory

8051 Data sheet

8051 IDE

Development Tool (Compiler, Assembler, Linker, Debugger)

Data type size in IAR 8051

  • Note : the below program is executed in IAR embedded workbench  with 8051 Core.
  • 8051 char,unsigned char,  int, unsigned int size.


8051 Interface

Interfacing is one of the important concepts in micro-controller 8051 because the micro-controller is a CPU that can perform some operation on a data and gives the output. However to perform the operation we need an input device to enter the data and in turn output device displays the results of the operation. Here we are using keyboard and LCD display as input and output devices along with the micro-controller. Interfacing is the process of connecting devices together so that they can exchange the information and that proves to be easier to write the programs. There are different type of input and output devices as for our requirement such as LEDs, LCDs, 7segment, keypad, motors, Buzzer and other devices etc. See more https://aruneworld.com/category/embedded/8051-mcu/8051-interface/


8051 Other Links



if you have any queries call us +918300026060 or WhatsApp Dismiss


Your Cart

%d bloggers like this: