8/16-Bit Timer/Counter Interrupts; Table 7.5-1 8/16-Bit Timer/Counter Interrupt Control Flag Bits And Interrupt Source - Fujitsu F2MC-8L Series Hardware Manual

8-bit microcontroller
Hide thumbs Also See for F2MC-8L Series:
Table of Contents

Advertisement

7.5

8/16-bit Timer/Counter Interrupts

Whether the 8/16-bit timer/counter serves as an interval timer or counter, it generates
an interrupt request when the data register and count values match.
8/16-bit Timer/Counter Interrupts
Table 7.5-1 lists the interrupt request flag bit, interrupt request output enable bit, and interrupt
source of the 8/16-bit timer/counter.

Table 7.5-1 8/16-bit Timer/Counter Interrupt Control Flag Bits and Interrupt Source

Interrupt request flag bit
Interrupt request
enable bit
Interrupt source
Although interrupt requests from the 8/16-bit timer/counter are generated by timers 1 and 2
independently in 8-bit mode and, in 16-bit mode, they are generated by timer 1, basic
operations are all the same. This section only describes timer 1 interrupt operation in 8-bit
mode.
Timer 1 interrupt operation in 8-bit mode
The counter value is incremented from "00
When the counter value reaches, or matches the the value set in the comparate data latch
corresponding to the timer data register (T1DR), the interrupt request flag bit (T1CR T1IF) is set
to "1".
When the interrupt request flag bit is enabled (T1CR: T1IF = "1") at this time, an interrupt
request (IRQ3) is generated to the CPU. Use the interrupt handler to set the T1IF bit to "0" to
clear the interrupt request.
Note that the T1IF bit is set to "1" whenever the counter value matches the compare data latch
value, regardless of the value in the T1IE bit.
Since timers 1 and 2 operate independently of each other and can generate the same interrupt
request (IRQ3) separately in 8-bit mode, software may need to evaluate the interrupt request
flag bit.
Notes:
The T1IF bit is not set when a match between the counter and T1DR register values occurs
concurrently with the stop of the counter (T1CR: T1STR = "0").
An interrupt request is generated as soon as the T1IE bit is enabled from disabled ("0" -->
"1") when the T1IF bit is "1".
8-bit mode
Timer 1
T1CR: T1IF
T1CR: T1IE
Match between T1DR
set value and 8-bit
counter value
7.5 8/16-bit Timer/Counter Interrupts
Timer 2
T2CR: T2IF
T2CR: T2IE
Match between T2DR
set value and 8-bit
counter value
" in synchronization with the selected count clock.
H
16-bit mode
Timer 1 + timer 2
T1CR: T1IF
T1CR: T1IE
Match between T1DR plus
T2DR set value and 16-bit
counter value
175

Advertisement

Table of Contents
loading

Table of Contents