
PROGRAMMING THE PERIPHERALS OF 8051 553
;the ISR of Timer 1
T1_ISR: CLR TR1 ;stop Timer 1
CPL P1.3 ;complement P1.3
MOV TL1,#024H ;low byte of OFF time count
MOV TH1,#0FAH ;high byte of OFF time count
SETB TR1 ;start timer
RETI
END
e problem in Example 14.17 uses the value of delay in Example 14.5. A symmetric
square wave is to be generated using mode 1, which needs the count to be re-loaded after
each cycle.
In the main program, the timer is started, but no count value is loaded into its reg-
isters. It starts with the default value of 0. e timer fl ag gets set and then an interrupt
occurs which takes control to the label T1_ISR ...