Professional Documents
Culture Documents
Important NOTE
•TAKE NOTES IN RECORD (Can strike
also, no marks will be reduced)
•Enter your registration number and
Full Name next to
1) all the plots and
2) all the programs.
W5.E5 8051 Keil – Hardware - Interrupt and LED
Hardware interfacing
LEDs with Timers and
Interrupt of 8051
W5.E5 8051 Keil – Hardware - Interrupt and LED
P1.7
P1.6
G
G
P1.6
P1.7
W5.E5 8051 Keil – Hardware - Interrupt and LED
where X represents the number of times the whole range from 0000
to FFFF needs to be repeated to generated an overall delay of 1
second (1000 ms).
X = 1000/71.1065 = 14
W5.E5 8051 Keil – Hardware - Interrupt and LED
17. After verifying outputs -> Click RESET in KIT -> Stop Debug in
Keil -> Stop Debugging.
18. Remove file from source group and add new .asm file for next
program.
W5.E5 8051 Keil – Hardware - Interrupt and LED
Low-level signal
• In the level-triggered mode, INT0 and INT1 pins are normally high.
• If a low-level signal is applied to them, it triggers the interrupt.
• This is called a level-triggered or level activated interrupt and is the
default mode upon reset of the 8051.
• Pins P3.2 and P3.3 are used for normal I/O unless the INT0 and
INT1 bits in the IE register are enabled.
W5.E5 8051 Keil – Hardware - Interrupt and LED
TCON Register
W5.E5 8051 Keil – Hardware - Interrupt and LED
Note: INT1 pin is P3.3 and is a push button in left corner, along the
RESET push button in 8051 kit.
W5.E5 8051 Keil – Hardware - Interrupt and LED
W5.E5 8051 Keil – Hardware - Interrupt and LED
W5.E5 8051 Keil – Hardware - Interrupt and LED
P1.3 P1.5
P1.5 P1.3 G
W5.E5 8051 Keil – Hardware - Interrupt and LED
W5.E5 8051 Keil – Hardware - Interrupt and LED
DJNZ R1,HERE2
;DECREMENT R1
W5.E5 8051 Keil – Hardware - Interrupt and LED