- 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
Block Diagram of 8051
- 8 bit register also called as A regiester or Acc 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
- 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
- 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
- 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.
Timer and Control Unit
- It gives all timing and control of micro-controller
- Its using for generate a signal for controller
- This decode the next execute instruction’s op-code
EPROM and Program address register
RAM Address registers
SFR Register Banks
- Vcc – +5v supply Voltage.
- Vss – Ground Pin
- Reset – Using for reset the micro-controller
- 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
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.
//What will be printed as the result of the operation below
///compiled in IAR 8051 core
printf("\n 8051 char size : %d",sizeof(char));
printf("\n 8051 unchar size : %d",sizeof(unsigned char));
printf("\n 8051 int size : %d",sizeof(int));
printf("\n 8051 unsigned int size : %d",sizeof(unsigned int));
/* Output :
8051 char size : 1
8051 unchar size : 1
8051 int size : 2
8051 unsigned int size : 2
- Line Follower Robot using 8051 Microcontroller
- GSM Module Interfacing with 8051 Microcontroller
- Displaying an Image on Graphical LCD using 8051 Microcontroller
- Digital Clock using 8051 Microcontroller
- Interfacing ADC0808 with 8051 Microcontroller
- Digital Code Lock using 8051 Microcontroller
- Bluetooth Controlled Home Automation System using 8051
- PIR Sensor and GSM Based Security System
- RFID and Keypad Based Security System using 8051 Microcontroller
- RFID Based Attendance System
- Cell Phone Controlled Robot using 8051 Microcontroller
- Edge Avoiding Robot Using 8051
- Keil 8051 Example Programs*
- circuitdigest 8051-microcontroller-projects*
- Interfacing of 8051 with (i2c based) 24LC64 EEPROM (code + Proteus simulation)*
- 8051 DAC (using DAC0808) code + Proteus simulation*
- 8051 LCD Interfacing code (In 4bit mode) + Proteus Simulation
- saeedsolutions (8051 micro-controller Projects)*