Arq 8051
Arq 8051
Arq 8051
Microcontroladores
www.inacap.cl
Indice
Caractersticas del Microcontrolador 8051 Arquitetura 8051 Memria interna rea de RAM Clock y Reset Temporizacin
www.inacap.cl
www.inacap.cl
Microcontroladores y Fabricantes
Atmel ARM Intel 8-bit 8XC42 MCS48 MCS51 8xC251 16-bit MCS96 MXS296 National Semiconductor COP8 Microchip 12-bit instruction PIC 14-bit instruction PIC PIC16F84 16-bit instruction PIC NEC Motorola 8-bit 68HC05 68HC08 68HC11 16-bit 68HC12 68HC16 32-bit 683xx Texas Instruments TMS370 MSP430 Zilog Z8 Z86E02
www.inacap.cl
8051
Part Number Fabricante ROM RAM Pinos I/O Timers Interrupciones Vcc Package
4K 4K 8K 4K
32 32 32 32 32
2 2 2 3 2
5 5 5 8 6
5v 5v 5v 5v 5v
40 40 40 40 40
AT89C1051
AT89C2051 DS5000-8 DS5000T-8
Atmel
Atmel Dallas Dallas
1K
2K 8K 32K
64
128 128 128
15
15 32 32
1
2 2 2
3
6 6 6
3v
3v 3v 3v
20
20 40 40
www.inacap.cl
www.inacap.cl
Perifricos
2 4 1 5
Timers de 16 bits com 4 modos funcionamiento puertos paralelos Canal de comunicacin serial fuentes de interrupcin independentes
2 externas 2 timers 1 canal serial
Set de instrucciones
112 instrucciones bsicas
Instruciones aritmticas; Instrucciones lgicas Instrucciones moviminto Instrucciones saltos y desvios Instrucciones de controe interno
7
www.inacap.cl
Pines 8051
P1.0 P1.1 P1.2 P1.3 P1.4 P1.5 P1.6 P1.7 RST (RXD)P3.0 (TXD)P3.1 (INT0)P3.2 (INT1)P3.3 (T0)P3.4 (T1)P3.5 (WR)P3.6 (RD)P3.7 XTAL2 XTAL1 GND 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 40 39 38 37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 Vcc P0.0(AD0) P0.1(AD1) P0.2(AD2) P0.3(AD3) P0.4(AD4) P0.5(AD5) P0.6(AD6) P0.7(AD7) EA/VPP ALE/PROG PSEN P2.7(A15) P2.6(A14) P2.5(A13) P2.4(A12) P2.3(A11) P2.2(A10) P2.1(A9) P2.0(A8)
8
www.inacap.cl
Vcc
GND
Pines 8051
AD0 AD1 AD2 AD3 AD4 AD5 AD6 AD7 A8 A9 A10 A11 A12 A13 A14 A15
PORT 0
P2.0 P2.0 P2.0 PSEN P2.0 EA/VPP P2.0 ALE/PRG P2.0 P2.0 P2.0 RXD TXD INT0 INT1 T0 T1 WR RD P3.0 P3.1 P3.2 P3.3 P3.4 P3.5 P3.6 P3.7 P1.0 P1.0 P1.0 P1.0 P1.0 P1.0 P1.0 P1.0
PORT 2
PORT 1
PORT 3
www.inacap.cl
On-chip RAM
Timer 1 Timer 0
Counter Inputs
CPU
Serial Port
OSC
Bus Control
4 I/O Ports
P0 P1 P2 P3
TxD RxD
10
www.inacap.cl
CY, AC, OV
CY AC F0 RS1 RS0 OV P
B IP IE SBUF
P PARITY
ULA
ACC
SFRs DECODER
SCON TH1 TL1 TH0 TL0 TMOD TCON DPH DPL SP BYTE ENDEREVEL
TIMER CONTROL
RAM DECODER
P1 P1.0 P1.7
P3 P3.0 P3.7
P2 P2.0 P2.7
11
www.inacap.cl
LS02
LS138
LE
ALE
E A0-15
A0-A13
AD7-0 8051
373 Alow
Di Qi Data PSEN
27C128
Q0-Q7
PSEN
12
www.inacap.cl
Memria en 8051
Memria de programa
7 FFFF PSEN 1000 0FFF 60 K External OU 0000 EA = 0 0 FFFF 7 0
64 K External
PSEN
4K 0000 Internal EA = 1
Memria de Dados
FF 80 7F 00 FFFF SFRs E RAM 64 K External 0000 RD WR
Internal
Direct Direct , Register, Reg. Indirect
13
www.inacap.cl
SFRs
*B * ACC * PSW * IP * P3
RAM
99 98 90
30
8D 8C 8B 8A 89 88 87 83 82 81 80
* = Bit enderevel
Bank 0
14
www.inacap.cl
Bancos de Registradores
1F
Bank 3
18 17
8051
Bank 2
10 0F
8052
Bank 1
08 07 06 05 04 03 02 01 00 R7 R6 R5 R4 R3 R2 R1 R0
Bank 0
15
www.inacap.cl
2C
2B 2A 29 28 27 26 25 24 23 22 21 20 0F 07 06 05 04 03 02 01 1A 10 08 00
8052
16
www.inacap.cl
EA/VPP X1
X2 RST 9 8.2 K
17
www.inacap.cl
18
www.inacap.cl
www.inacap.cl
S1
S2
S3
S4
S5
S6
S1
S2
S3
S4
S5
S6
S1
S2
S3
S4
S5
S6
S1
S2
S3
S4
S5
S6
Abajo las seales y tiempos involucrados en la busqueda en la memria de programa externa de la instruccin MOVX. S1 S2 S3 S4 S5 S6 S1 S2 S3 S4 S5 S6 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 P1 P2 Seal de ALE: PSEN\ : RD\: P2: PCH Out P0:
Inst. in
PCH Out
PCL Out
Inst. in
PCH Out
PCL Out
Inst. in
PCH Out
PCL Out
Inst. in
PCH Out
PCL Out
20
www.inacap.cl