7480 Group and 7481 Group User's Manual
1-88
1.12 Timer X and Timer Y
HARDWARE
1.12.10 PWM Mode
(1)
Operations in PWM Mode
Operations in the PWM mode are explained with Figure 1.12.24.
Count Sources
In the PWM mode, timer X or timer Y can select the following count sources with the timer X or Y
count source selection bits:
f(XIN)/2
f(XIN)/8
f(XIN)/16
Writes to and Reads from Timers
When ‘TL (000016 through FFFF16)’ is written to a timer, the following different operations are
performed depending on the state of the timer X or Y write control bit:
In the ‘0’ state of the timer X or Y write control bit, the ‘TL’ is set in both the timer latch and the
timer ( in Figure 1.12.24).
In the ‘1’ state of the timer X or Y write control bit, the ‘TL’ is set in the timer latch only.
Also, the contents of the timer can be read by a read operation.
Count Operation
In the PWM mode, the high- and the low-order byte of a timer counts down each as an 8-bit timer.
When the timer X or Y stop control bit is cleared to ‘0’ in the HIGH state of the PWM output, only
the high-order byte of the timer starts counting down ( in Figure1.12.24), while in the LOW state
of the PWM output, only the low-order byte of the timer starts counting down ( in Figure 1.12.24).
When the stop control bit is set to ‘1’, both the high- and the low-order byte stop counting down
( in Figure 1.12.24).
In the count operation, the contents of the high- or the low-order byte of the timer are decremented
by 1 at every rising edge of the count source ( in Figure 1.12.24).
When either the high- or the low-order byte of an operating timer becomes ‘0116’, it stops counting.
At the same time, the other starts counting ( in Figure 1.12.24).
Reloading Timers
When either the high- or the low-order byte of an operating timer becomes ‘0116’, an underflow
occurs at the subsequent rising edge of the count source, and the contents of the timer latch is
reloaded to the timer ( in Figure 1.12.24).
Timer Interrupt
At an rising edge of the PWM output waveform, the timer X or Y interrupt request bit is set to ‘1’;
then a timer interrupt request is generated ( in Figure 1.12.24).
PWM Output
When timer X is used, the PWM waveform is output from the CNTR0 pin.
When timer Y is used, the PWM waveform is output from the CNTR1 pin.