Thursday 26 May 2016

TURNING ON AND OFF LED BY USING TIMER 0/1 AND MAKE THE USE OF DIFFERENT MODES OF TIMER

TURNING ON AND OFF LED BY USING TIMER 0/1 AND MAKE THE USE OF DIFFERENT MODES OF TIMER


In this practical we use timer 0 to create a square wave on P1.0 by connecting an LED through resistor also show the waveform on Oscilloscope.
TURNING ON AND OFF LED




Steps:

First of all make your microcontroller active by connecting the crystal from pin number 18 and 19(see in figure 2) 
Set the reset button from pin 9 as shown in figure 3.
Make the controller in working order as show in figure 4, then connect an LED through resistor to pin of port 1.0
Write a program of ON and OFF LED by using timer 0/1 in assembly language.
Burn the assembly language program in microcontroller through universal programmer.
You can see th wave form on oscilloscope.

Circuit Diagram:

TURNING ON AND OFF LED
pic configuration of ATML 89S52

TURNING ON AND OFF LED
Attachment of crystall figure number 2
TURNING ON AND OFF LED
Reset button figure no.3
TURNING ON AND OFF LED
Working condition of microcontroller figure 4
TURNING ON AND OFF LED
LED connection

Assembly Language Program :




ORG 00H
MOV P1,#0FFH
MAIN:MOV TMOD,#01H
MOV TH0,#00H
MOV TL0,#00H
SETB TR0
LOOP: JNB TF0,LOOP
CPL P1.0
CLR TR0
CLR TF0
JMP MAIN




For any question comment below or click here for further information

0 comments:

Post a Comment