8051
Micro controller
Basics
What are Micro controller's ? Why the name Micro controller ?
Basically used for control actions.It is used to control the operation of machine using fixed program that is stored in ROM/EPROM and that does not change over the life time.
What is MCS 51 ?
Why to study 8051 ?
August 28, 2008 Y.H.Dandawate 2
August 28, 2008
Y.H.Dandawate
3
Features of 8051
8 bit ALU. 16 bit PC and DPTR. 8 bit stack pointer and 8 bit PSW. 4K internal ROM 128 bytes of Internal RAM. 32 bits arranged as four,8 bit ports P0-P3. Two 16 bit timer/counters, T0 & T1. Full duplex serial Port.
August 28, 2008 Y.H.Dandawate 4
Features contd…
Control Registers TCON,TMOD,SCON,PCON,IP,IE etc (SFR’s). Two External and three internal interrupt sources. 0-12 MHz clock. 40 pin DIP package. Works in Power Down and Idle mode. Powerful Instruction set.
August 28, 2008 Y.H.Dandawate 5
Block Diagram of 8051.
Pin Diagram of 8051
August 28, 2008
Y.H.Dandawate
8
August 28, 2008
Y.H.Dandawate
9
August 28, 2008
Y.H.Dandawate
10
Internal RAM Organization
August 28, 2008
Y.H.Dandawate
12
August 28, 2008
Y.H.Dandawate
13
Internal RAM Organization
August 28, 2008
Y.H.Dandawate
14
Clock for 8051.
Tin = N * 12 / Clk.Freq
August 28, 2008
Y.H.Dandawate
15
Program Status Word (PSW)
7
CY
6
AC
5
F0
4
3
2
1
0
P
RS1 RS0 OV ---
August 28, 2008
Y.H.Dandawate
16
I/O Ports of 8051-Port 0
August 28, 2008
Y.H.Dandawate
17
I/O Ports of 8051-Port 1
August 28, 2008
Y.H.Dandawate
18
I/O Ports of 8051-Port 2
August 28, 2008
Y.H.Dandawate
19
I/O Ports of 8051-Port 3
August 28, 2008
Y.H.Dandawate
20
Memory Interfacing with 8051
How to interface Program memory(EPROM) up to 64 KB to 8051 ? How to interface Data memory(RAM) upto 64 KB to 8051 ? How 8051 distinguishes Program and data memory operations ?
August 28, 2008
Y.H.Dandawate
21
Timer Control Register (TCON)
7
TF 1
6
TR1
5
TF0
4
TR0
3
IE 1
2
IT1
1
IE0
0