Fujitsu MB89950/950A Pager User Manual


 
165
CHAPTER 8 PULSE WIDTH COUNT TIMER (PWC)
8.10 Program Example for Timer Function of Pulse Width Count
Timer
This section gives two program examples for the timer function of the pulse width
count timer.
Program example 1 for interval timer function (reload timer mode)
Processing description
Generates repeated interval timer interrupts at 3 ms intervals (reload timer mode).
The TO bit will be inverted after each interval time cycle. The initial value of TO bit is "0" level.
The following shows the RLBR register value that results in an interval time of approximately 3 ms for
a 5 MHz main clock oscillation frequency. The count clock is 32 t
inst
(t
inst
: Instruction cycle).
RLBR register value = 3 ms/(32 x 4/5 MHz) = 117.2 (075
H
)