S1C88348/317/316/308 TECHNICAL SOFTWARE
EPSON
II-75
12 PROGRAMMABLE TIMER
Notes
(6)
The R27 terminal is the common terminal for the normal DC output port and the TOUT output.
When TOUT is being output, set R27 register to "1" and control the signal ON/OFF using the TOUT
register.
(7)
When the pulse output control is set to off ("0"), the setting of the pulse output channel selection
becomes invalid.
(8)
When programmable timer 1 is selected as the clock source for the serial interface, pay attention to
the setting value for timer 1, the mode selection for timer 1 and the interrupt setting. Be advised
that in this case, it is impossible to use it as a 16-bit timer coupling both timer 0 and timer 1.
(9)
When coupling programmable timers 0 and 1 for use as a 16-bit timer, the setting of timer 0
becomes valid for timer operation and the setting of timer 1 becomes invalid. However, since an
interrupt is generated by the underflow of timer 1, set the interrupt related routine with timer 1.
(10) When stopping the programmable timer by writing "0" into the RUN/STOP control register for the
programmable timer 0 and 1, the programmable timer count actually stops when it advances one
count with the timing synchronized to the input clock selected with the prescaler dividing clock.
For this reason, when the programmable timer stops, if the respective interrupt factors are gener-
ated, the respective interrupt factor flags are set and if interrupt is enabled, an interrupt is gener-
ated. Thus, you should add an interrupt processing and interrupt factor flag resetting, if necessary.
(11) A noise reject circuit is not included in the input port (K port). For this reason, when the program-
mable timer is used for event counter in the program example (3) or for pulse width measurement
in the example (4), the following operation will occur if there is chattering in the K10 input, so,
input waveform shaping or adding external noise reject processing with an external circuit and
software is necessary. In case of the event counter in the program example (3), if there is chattering
in the K10 input, the chattering may be counted. In the case of pulse width measurement in the
program example (4), if there is chattering in the K10 input, successive interrupts may be generated
in the measurement start trigger timing of the rising or falling K10 input.
(12) When a down-counter underflow occurs, the one-shot timer mode sets the reload register value to
the counter data register, to stop the count. For this reason, when you want to continue the count at
the same count number, you should restart to timer. If you want to newly set a different count
number, set the new value in the reload register, then set it to the count data register, and then start
the timer.
(13) In the examples of programmable timer control programs which use an interrupt, the vector
address setting and program have been allocated from 003000H for the sake of convenience. For an
example which does not use an interrupt, a specific address has not been allocated as in the exam-
ples in other chapters.