Operation Of 16-Bit Free-Run Timer - Fujitsu MB91260B Series Hardware Manual

32-bit microcontroller
Table of Contents

Advertisement

11.6.1

Operation of 16-bit Free-run Timer

After 16-bit free-run timer reset is completed, the counter begins counting up from the
value set in the timer data register (TCDTH/TCDTL). The count value is used as the
standard time of the 16-bit output compare and 16-bit input capture.
■ Timer Clear
The count value of the 16-bit free-run timer is cleared when one of the following:
• When a match with the compare-clear register is detected via up count mode (TCCSL register MODE:
bit5 = 0)
• When "1" is written to the TCCSL register's SCLR: bit4 during operation
• When "0000
• Resetting
After a reset, the counter is immediately cleared. When there is a match with the compare-clear register, the
counter is cleared in synchronization with the count timing.
Compare clear
register value
Compare match
Count value
■ Timer Mode
The following modes can be selected for the 16-bit free-run timer.
• Up count mode (TCCSL register MODE: bit5 = 0)
• Up/down count mode (TCCSL register MODE: bit5 = 1)
When in up count mode, the counter starts counting from a value previously set in the timer data register
(TCDTH/TCDTL), and counts up until the count value matches the value of the compare-clear register
(CPCLRH/CPCLRL). The counter is then cleared to "0000
When in up/down count mode, the counter starts counting from a value previously set in the timer data
register (TCDTH/TCDTL), and counts up until the count value matches the value of the compare-clear
register (CPCLRH/CPCLRL). The counter then starts counting from up to down, until it reaches the value
"0000
", after which it again starts counting up.
H
It is possible to write a value to the mode bit (TCCSL register's MODE: bit5) at any time, whether the timer
is operating or stopped. Values written to this bit while the timer is operating go into the buffer, and the
count mode changes when the timer value reaches "0000
" is written to the TCDTH/TCDTL register while stopped
H
Figure 11.6-1 Clear Timing of 16-bit Free-run Timer
φ
CHAPTER 11 MULTIFUNCTIONAL TIMER
N
N
", and starts counting up again.
H
".
H
0000
H
261

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fr60lite

Table of Contents