Figure 7.5A Interval Timer Function Settings; Figure 7.5B Operation Of 8-Bit Pwm Timer; Operation Of Interval Timer Function - Fujitsu F2MC-8L MB89620 Series Hardware Manual

8-bit microcontroller
Table of Contents

Advertisement

5
7.

Operation of Interval Timer Function

This section describes the operation of the interval timer function of the 8-bit PWM
timer.
n Operation of Interval Timer Function
Figure 7.5a shows the settings required to operate as the interval timer function.
On activation, the counter starts counting-up from "00
clock. When the counter value matches the value set in the COMR register (compare value), the
PWM timer inverts the level of the output pin (PTO pin) on the next rising edge of the count
clock, clears the counter, sets the interrupt request flag bit (CNTR: TIR = "1"), and restarts
counting from "00
Figure 7.5b shows the operation of the 8-bit PWM timer.
*: If the PWM compare register (COMR) value is modified during counter operation, the new value is used from the next cycle.
Check: Do not change the count clock cycle (CNTR: P1, P0) during operation of the interval timer function
Notes: • Setting the COMR register value to "00
148
CHAPTER 7 8-BIT PWM TIMER
Bit 7
CNTR
P/TX
0
COMR

Figure 7.5a Interval Timer Function Settings

".
H
Counter value
Compare value (FF
FF
H
80
H
00
H
Timer cycle
COMR value (FF
)
H
TIR bit
TPE bit
OE bit
PTO pin
When the output pin control bit (OE) is "0", the pin operates as a general-purpose I/O port (P37).

Figure 7.5b Operation of 8-bit PWM Timer

(CNTR: TPE = "1").
of the selected count clock.
• When the counter is stopped (CNTR: TPE = "0") while the interval timer function is selected, the
PTO pin outputs an "L" level.
Bit 6
Bit 5
Bit 4
Bit 3
P1
P0
TPE
1
Sets interval time (compare value).
H
)
H
COMR value modified (FF
Cleared by the program
" causes the PTO pin output to be inverted with the cycle
H
Bit 2
Bit 1
Bit 0
TIR
OE
TIE
" on the rising edge of the selected count
Compare value (80
)
H
→ 80
)*
H
H
: Used bit
1 : Set "1".
0 : Set "0".
Time
MB89620 series

Advertisement

Table of Contents
loading

Table of Contents