2. SESSION’S AGENDA
Introduction To 8051 Microcontroller
Characteristics of 8051 Microcontroller
Pin Diagram Of AT89C51
Programming Languages
• Assembly Language
• High Level Language (Hardware C )
Software Used
Led, 7 Segment, LCD And Its Interfacing
Project Undergone
• Interfacing of Digital Clock With Visitor Counter
3. The Intel 8051 micro controller is the "grandfather" of all
modern micro controllers. Over 10 manufacturers (including
Intel) now make over 100 different varieties of 8051 micro
controllers.
It was developed in 1971.
The most commonly used 8051 ICs are AT89C51,AT89S51.
8051 microcontroller enters the data in HEXADECIMAL.
Maximum Storage of 8 bit microcontroller is 255.
INTRODUCTION TO 8051
MICROCONTROLLER(MCU)
4. Characteristics of Microcontroller
(MCU)
RAM 128 Bytes
ROM 4 KB
Extended Memory up to 64 KB
Architecture Von Neumann
Technology CISC
Power Required +5 V (DC)
Bovd rate 9600
Packaging DLP
Timers TMOD,TCON
GPR 32 bits
Frequency to run
a program 921.6 KHz
Time to run
a program 1.085 μsec
5. Pin Diagram of
AT89C51
It is 40 pin IC.
It has 4 Port(P0,P1,P2,P3).
It has 8 special pins and 32 general
pins .
8 special pins are :
9th pin(Reset) has the highest
authority.
18,19 pins are for providing pulse by
crystal oscillator.
20 pin is generally grounded.
29 pin-PSEN(Program Store Enable)
30 pin-ALE(Address Latch Enable)
31 pin-EA (Enable/External access)
40 pin is given VCC i.e. power
6. ASSEMBLY LANGUAGE
It is a Case Insensitive Language.
Basic elements are Label, Comments, Operands,
Directives and Commands.
A Label is a textual designation (generally an easy-to-
read word) for a line in a program, or section of a
program .
Comment is a series of words that a programmer
writes to make the program more clear and legible.
An operand is a value on which the instruction is to
be performed. The operand may be a processor
register, a memory address, a literal constant, or a
label.
Directive is similar to an instruction, but unlike an
instruction it is independent on the microcontroller
model, they are usually given purposeful meanings via
variables or registers.
7. ASSEMBLY LANGUAGE
Commonly used ,Commands are as following :
MOV
Syntax : MOV desination,source
Example: MOV R1,#20h
h represents no is in hexadecimal
R1 is a destination register
# is pond sign
Note: When there is an alphabet at MSB then 0 is
always used before it i.e.
MOV R1,#0a4h
MCU accepts 8 bit data hence to represents 0-9 no
we use 0 before it i.e.
MOV R1,#04h
8. ASSEMBLY LANGUAGE
ADD
Syntax: ADD desination,source
ADD command is always used in
accumulator.
JZ
Syntax: JZ A, label
Jump if zero i.e. if A=0 then Jump to label
Example: org 00h
MOV A ,#0
JZ A,SS
MOV R1,#6
SS:MOV R2,#23
END
MOV R1,#6 will not be performed as it will jump to SS
9. ASSEMBLY LANGUAGE
JNZ
Syntax :JNZ A, label
Jump if not zero i.e. if A≠0 then Jump to label
Example: org 00h
MOV A ,#10
JNZ A,SS
MOV R1,#6
SS:MOV R2,#23
END
MOV R1,#6 will not be performed as it will jump to SS
DJNZ
Same as JNZ only the value of the Accumulator is
decremented
INC/DEC
Value of register is incremented and decremented
CPL
Compliment of the accumulators value
10. HIGH LEVEL LANGUAGES
o Embedded C is a high level language that is
commonly used
o Developed by Dennis Ritchie & Bell Labs
o C is a Case Sensitive Languages
o C use header file <reg51.h>
o SPECIAL FUNCTION REGISTER
Sbit is used to set a bit high
It is written before main function and after
header file
11. Software Required
Keil software used to write program in either of the
language c or assembly
Editor window Human
Assembler
Linker Machine
OH Converter
UC
Proteus is used to design the software circuitry
It is used to see the code interaction with simulated
Hardware in Real time.
Avaible for PIC,8051,MSP430,AVR,HC11,ARM7/LPC2000
and basic Stamp Processors
12. Light Emitting Diode And Its
Interfacing
Color: LEDs can emit light of an intended color
without using any color filters as traditional lighting
methods need. This is more efficient and can lower
initial costs.
Size: LEDs can be very small (smaller than 2 mm).
On/Off time: LEDs light up very quickly
Applications :
• Indicators and signs
• Data communication and other signaling
• Sustainable lighting
14. 7 Segment Display And Its
Interfacing
* It is generally of 2 types :
Common Cathode
It’s 3 and 8 pins are
grounded for its
working
More Brighter
More Logical
Common Anode
It’s 3 and 8 pins are
given Vcc for its
working
Less Brighter
Less Logical