Fujitsu FR81S Manual Do Utilizador
CHAPTER 5: CLOCK
5. Operation
FUJITSU SEMICONDUCTOR LIMITED
CHAPTER : CLOCK
FUJITSU SEMICONDUCTOR CONFIDENTIAL
74
5.4.5. Procedure for Setting the Timer Interrupt
The procedure for setting the timer interrupt is shown.
This section describes the procedure for setting interrupt. The examples of the procedure for setting interrupt
are shown as follows.
Sets the timer interrupt disable (MTMCR.MTIE=0)/(STMCR.STIE=0)
and the interrupt flag clear(MTMCR.MTIF=0)/(STMCR.STIF=0)
↓
Sets the timer operation disable (MTMCR.MTE=0)/(STMCR.STE=0)
↓
Verifies MTC=0/STC=0
↓
Sets the period of the timer (MTMCR.MTS=1000 to 1111)/(STMCR.STS=000 to 111)
↓
Sets the timer interrupt enable (MTMCR.MTIE=1)/(STMCR.STIE=1)
↓
Sets the timer operation enable (MTMCR.MTE=1)/(STMCR.STE=1)
↓
The interrupt occurs after setting time
↓
To the interrupt routine
↓
Sets the interrupt flag clear (MTMCR.MTIF=0)/(STMCR.STIF=0)
↓
Verifies the interrupt flag (MTMCR.MTIF=0)/(MTMCR.STIF=0)
↓
Program operations
↓
RETI
* Repeat reading until "0" is read because actual setting of the interrupt flag clear is delayed.
MB91520 Series
MN705-00010-1v0-E
235