Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
8051
Microcontroller
(Hardware Specification)
Lec note 4
Microcontroller (uC)
u-Computer on a single chip of silicon
A uP
single-chip contained only CPU
bus is available
RAM capacity, num of port is selectable
RAM is larger than ROM (usually)
A uC
single-chip contained CPU, RAM, ROM, Prepherals, I/O port
Communicate by port
internal hardware is fixed
ROM is larger than RAM (usually)
CPU
OSC Bus
4 I/O Ports Serial
Control
P0 P2 P1 P3 TXD RXD
Addr/Data
hsabaghianb @ kashanu.ac.ir Microprocessors 4-8
Other 8051 featurs
Keyboard
Printer
video game player
MP3 music players
Embedded memories to keep configuration
information
Mobile phone units
Domestic (home) appliances
Data switches
Automotive controls
8951 4k 128 2 6 32 -
8952 8k 256 3 8 32 -
891051 1k 64 1 3 16 AC
892051 2k 128 2 6 16 AC
B1
Read pin
B1
Read pin
B1
Read pin
B1
Read pin
3. Read pin=1 Read latch=0
B1
Read pin
3. Read pin=1 Read latch=0
8051 IC
B1
Read pin
8051 IC
Vcc
10 K
P0.0
8751 P0.1
Port 0
P0.2
8951 P0.3
P0.4
P0.5
P0.6
P0.7
C1
XTAL1
30pF
GND
N XTAL2
C
EXTERNAL
OSCILLATOR
SIGNAL XTAL1
GND
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
Vcc
31
EA/VPP
X1
10 uF 30 pF
X2
RST
9
10 K
FFFFh
External
DATA
Chip 8051 Memory
)up to 64KB(
Internal RAM RAM
0000h
SFRs
FFFFh
External
Internal code CODE
Memory Memory
(EEPROM) )up to 64KB(
ROM
0000h
WR WR
RD
PSEN RD
ALE 74LS373 CS
Clk
P0.0 A0
D
P0.7 A7
D0
D7
EA
P2.0 A8
P2.7 A15
8051 RAM
hsabaghianb @ kashanu.ac.ir Microprocessors 4-46
Overlap External Code and Data Spaces
Bank 1
08
07 R7
06 R6
05 R5
04 R4
03 R3 Bank 0
02 R2
01 R1
00 R0
21 0F 08
20 07 06 05 04 03 02 01 00
DATA registers
CONTROL registers
Timers
Serial ports
Interrupt system Addresses 80h – FFh
Analog to Digital converter
Digital to Analog converter Direct Addressing used
Etc. to access SFRs
A (Accumulator)
B
PSW (Program Status Word)
SP (Stack Pointer)
PC (Program Counter)
DPTR (Data Pointer)
Used in assembler
instructions
R0
DPTR DPH DPL
R1
R2 PC PC
R3
R6
R7