8051 Architecture For Cia1
8051 Architecture For Cia1
• 8 – bit CPU with registers A and B • 4 ports P0, P1, P2, P3 each 8 – bit length
• 16 – bit PC and DPTR • Two 16 – bit timers / counters T0, T1
• 8 – bit SP and PSW • Full Duplex serial transmitter / receiver
• 4k – internal ROM • Control registers TCON TMOD SCON
• 128 bytes of internal RAM • 2 external and 3 internal interrupt sources
4 register banks , each containing 8 registers
• Oscillator and clock circuitry ---- 1 MHz
16 bit addressable bytes to 16MHz
80 general purpose data memory
The features of the computer are best learned by the internal hardware design,
also called the architecture of the device, to determine the type number, and
size of the registers and other circuitry.
8051 Block diagram
Registers
Whether accessing externally connected RAM or on-chip ROM, we need 16-bit pointer in
such case, the DPTR register is used
DPTR can also be accessed as two 8-bit registers, the high byte DPH and low byte DPL
DPTR does not have single internal address
8051 Oscillator and Clock
• The heart of 8051 is the circuitry that generates the clock pulses by which all internal
operations are synchronized
• Pins XTAL1 and XTAL2 are provided for connecting a resonant network to form an
oscillator, typically Quad crystal and capacitors are employed as shown in figure
• If the basic clock frequency is not divisible without a reminder then the resulting
communication frequency is not called standard frequency
Port 2 can be used as input or output, it does not need any pullup
resistors since it already has pull-up resistors internally, upon
reset, port 2 is configured as an input port, to make port 2 an
input port, it must be programmed as such by writing 1 to all its
bits
Port 2 is also designated as A8 – A15, indicating its dual function
Port 0 provides the lower 8 bits via A0 – A7
Port 3 can be used as
input or output
Port 3 is configured as an
input port upon reset, this
is not the way it is most
commonly used
The rate of data transfer in serial data communication is stated in bps (bits per second)
Another widely used terminology for bps is baud rate
The 8051 has a serial data communication circuit that uses register SBUF to hold data.
Register SCON controls data communication,
Register PCON controls data rates,
Pins RXD (P3.0) and TXD (P3.1) connect to the serial data network.