7480 Group and 7481 Group User's Manual
1-80
1.12 Timer X and Timer Y
HARDWARE
1.12.8 Programmable Waveform Generation Mode
(1)
Operations in Programmable Waveform Generation Mode
Operations in the programmable waveform generation mode are explained with Figure 1.12.18.
Count Sources
In the programmable waveform generation 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.18).
In the ‘1’ state of the timer X or Y write control bit, the ‘TL’ is set in the timer latch only ( in Figure
1.12.18).
Also, the contents of the timer can be read by a read operation.
Count Operation
In the programmable waveform generation mode, the following starting point of a timer can be
selected with the timer X or Y trigger selection bit of the timer X or Y mode register:
When a valid edge of an INT0 pin input is detected (Timer X used).
When a valid edge of an INT1 pin input is detected (Timer Y used).
Clearing the timer X or Y stop control bit to ‘0’ brings the following results:
When the timer X or Y trigger selection bit is cleared to ‘0’, the timer starts counting.
When the timer X or Y trigger selection bit is set to ‘1’, the timer starts counting as soon as the
valid edge of an INT pin input is detected ( in Figure 1.12.18).
When the timer X or Y stop control bit is set to ‘1’, the timer stops counting.
Note: Keep the trigger widths input to the INT pins 250 ns or more.
In the count operation, the contents of each timer are decremented by 1 at every rising edge of the
count source ( in Figure 1.12.18).
Reloading Timers
When a timer reaches ‘000016’ in the count operation, an underflow occurs at the subsequent rising
edge of the count source, and the contents of the timer latch are reloaded to the timer ( in Figure
1.12.18).
Timer Interrupt
At an underflow, the timer X or Y interrupt request bit is set to ‘1’; then a timer interrupt request is
generated ( in Figure 1.12.18).