Overview Of 16-Bit Timer/Counter - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

1
9.

Overview of 16-bit Timer/Counter

The interval timer function counts-up in sync with the internal count clock (divide-by-
four source oscillation). The counter function counts-up a specified edge detected on
pulses input to an external pin.
n Interval Timer Function
The interval timer function generates interrupts at variable time intervals.
The 16-bit counter counts-up from the set value in sync with an internal count clock (divide-
by-four source oscillation) and generates an interrupt when the counter value overflows.
The interval timer can operate with a cycle among 1 and 2
cycle.
Repeated interrupts can be generated by resetting the interval time in the interrupt
processing routine.
Table 9.1a shows the interval time range.
Table 9.1a Interval Time Range
Internal count clock cycle
t
: Instruction cycle (divide-by-four source oscillation)
inst
Note: The following shows an example of calculating the interval time.
For a 10 MHz source oscillation (F
"0000
n Counter Function
The counter function counts-up an edge detected on pulses input to an external pin (EC pin).
The counter counts-up from the set value each time a specified edge is detected on the
external input. The counter function generates an interrupt when the counter value overflows.
The counter function can detect externally input pulses as short as two instruction cycles.
The function can be set to detect rising edges, falling edges, or both edges.
180
CHAPTER 9 16-BIT TIMER/COUNTER
1 t
inst
" is calculated as follows:
H
) × (2
Interval time = (4/F
C
Interval time
1 t
to 2
16
t
inst
inst
), the interval time for a 16-bit timer count register (TCR) value of
C
– TCR register value) = (4/10 MHz) × 65536
16
16
times the internal count clock
26.2 ms
MB89620 series

Advertisement

Table of Contents
loading

Table of Contents