of 16 /16
THE 8051 MICROCONTROLLER

8051 ram org

Embed Size (px)

Text of 8051 ram org

The 8051 Microcontroller

The 8051 Microcontroller

8051 Basic Component4K bytes internal ROM128 bytes internal RAMFour 8-bit I/O ports (P0 - P3).Two 16-bit timers/countersOne serial interface

RAM

I/O Port

Timer

Serial COM PortMicrocontroller

CPU

A single chip ROM

Block DiagramCPUInterruptControlOSCBusControl4kROMTimer 1Timer 2Serial128 bytes RAM4 I/O Ports

TXDRXD

External Interrupts P0 P2 P1 P3Addr/Data

Other 8051 featursonly 1 On chip oscillator (external crystal)6 interrupt sources (2 external , 3 internal, Reset)64K external code (program) memory(only read)PSEN64K external data memory(can be read and write) by RD,WRCode memory is selectable by EA (internal or external)We may have External memory as data and code

Comparison of the 8051 Family Members89XXROMRAMTimerInt SourceIO pinOther89514k1282632-89528k2563832-895312k2563932WD895520k2563832WD8982528k2563932ISP8910511k641316AC8920512k1282616AC

WD: Watch Dog TimerAC: Analog ComparatorISP: In System Programable

8051 Internal Block Diagram

Machine cycleFind the machine cycle for(a) XTAL = 11.0592 MHz (b) XTAL = 16 MHz.

Solution:

(a) 11.0592 MHz / 12 = 921.6 kHz; machine cycle = 1 / 921.6 kHz = 1.085 s(b) 16 MHz / 12 = 1.333 MHz; machine cycle = 1 / 1.333 MHz = 0.75 s

Address Multiplexing for External MemoryFigure 2-8Accessing external code memory

Accessing External Data Memory

Figure 2-11Interface to 1K RAM

Timing for MOVX instruction

On-Chip MemoryInternal RAM

Registers

0706050403020100R7R6R5R4R3R2R1R00F

0817

101F

18

Bank 3Bank 2Bank 1Bank 0Four Register BanksEach bank has R0-R7Selectable by psw.2,3

Bit Addressable RAM

Figure 2-6Summary of the 8051 on-chip data memory(RAM)

SFRs that are Bit AddressableSFRs with addresses ending in 0 or 8 are bit-addressable. (80, 88, 90, 98, etc)

Notice that all 4 parallel I/O ports are bit addressable.