Académique Documents
Professionnel Documents
Culture Documents
• CPU
• 128 bytes internal RAM
• 4K bytes internal ROM
• Four 8-bit I/O ports (P0 - P3).
• Two 16-bit timers/counters
• One serial port
Foot Print
P1.1 2 39 P0.0(AD0)
P1.2 3 38 P0.1(AD1)
P1.3 4 37 P0.2(AD2)
P1.4 5 36 P0.3(AD3)
P1.5 6 35 P0.4(AD4)
P1.6 7 34 P0.5(AD5)
P1.7 8 8051 33 P0.6(AD6)
RST 9 (8031) 32 P0.7(AD7)
(RXD)P3.0 10 (8751) 31 EA/VPP
(TXD)P3.1 11 30 ALE/PROG
(8951)
(INT0)P3.2 12 29 PSEN
(INT1)P3.3 13 28 P2.7(A15)
(T0)P3.4 14 27 P2.6(A14)
(T1)P3.5 15 26 P2.5(A13)
(WR)P3.6 16 25 P2.4(A12)
(RD)P3.7 17 24 P2.3(A11)
XTAL2 18 23 P2.2(A10)
XTAL1 19 22 P2.1(A9)
GND 20 21 P2.0(A8)
8051 Internal Block Diagram - Architecture
Features of 8051
• 8 Bit CPU with Registers A(Accumulator) and B
• 16 bit Program Counter and Data Pointer(DPTR)
• Arithmatic Logic Unit with 8 bit Program Status Word (PSW)
• 8 –bit Stack Pointer (SP)
• Internal ROM or EPROM with 4K capacity
• Internal RAM of 128 bytes
• Four Register banks each containing 8 registers R0-R7
• 16 bytes of RAM which are bit addressable
Features of 8051
• 80 bytes of general purpose 8 bit Data memory
• 32 Input/Output pins arranged as 4- 8 bit ports P0 – P3
• 2 - 16 bit Timer/Counters T0 & T1
• Serial Port - Full Duplex , data Transmitter/ Receiver with Buffer SBUF
• Control Registers : TCON, TMOD , SCON , PCON ,IP and IE
• 6 interrupt sources (2 external , 3 internal, Reset)
• Oscillator and Clock Circuits
• 64 K External code (program) memory (only read) by PSEN
• 64K External data memory(can be read and write) by RD,WR
Block Diagram
External Interrupts
CPU
OSC Bus
4 I/O Ports Serial
Control
P0 P2 P1 P3 TXD RXD
Addr/Data
Functions of Each Block
• 1. CPU- Central Processing Unit comprising of ALU
and Control units
ALU-Arithmetic and Logic Unit perform the
arithmetic and logical operations like addition,
subtraction , multiplication, logical AND,OR etc.
To do this operations one operand should be in
Accumulator, another may in B register or in general
purpose register. Mostly the result of the ALU
operations are in A register. Some results are in B
register also.
Oscillator
2.Oscillator provides clock for the Timimg &
control unit.
Crystal oscillator provides stability and
perfect clock. So crystal oscillator is used in
this microcontroller.
In 8051 Microcontroller all the operations
are executed based on the clock frequency
only and it is @ 12 MHz
3.INTERRUPT CONTROL