Epson S1C17624 Technical Manual page 164

Cmos 16-bit single chip microcontroller
Table of Contents

Advertisement

14
8-bit OSC1 Timer (T8OSC1)
14.1
T8OSC1 Module Overview
The S1C17624/604/622/602/621 includes a single-channel 8-bit OSC1 timer that uses OSC1 as its clock source.
The features of the T8OSC1 module are listed below.
• 8-bit up counter with a comparator
• The counter value can be compared with two specified comparison values (compare data and PWM duty data) by
the comparator.
• Can generate interrupts when the counter value matches compare data.
• Can generate a PWM signal from matching between the counter and two specified comparison values (compare
data and PWM duty data), and output it outside the IC.
Figure 14.1.1 shows the T8OSC1 module configuration.
Divider
OSC1
CLG
(1/1—1/32)
Timer reset
Run/Stop control
Count mode select
TOUT4
Compare match interrupt request
To ITC
The 8-bit OSC1 timer includes an 8-bit up-counter (T8OSC1_CNT register), an 8-bit compare data register
(T8OSC1_CMP register), and an 8-bit PWM duty data register (T8OSC1_DUTY register).
The up-counter can be reset to 0 via software and counts up using the OSC1 division clock. The count value can be
read via software.
The compare data and PWM duty data registers store the data used for comparisons against up-counter contents.
If the counter value matches the contents of each data register, the comparator outputs a signal to control the inter-
rupts and the PWM output signal. The compare data register can be used to set the interrupt generating and PWM
output clock cycles. The PWM duty data register can be used to set the PWM output clock duty ratio.
14.2
T8OSC1 Output Pin
Table 14.2.1 shows the T8OSC1 module output pin.
Pin name
TOUT4
The T8OSC1 output pin (TOUT4) is shared with an I/O port and is initially set as a general-purpose I/O port pin.
The pin function must be switched using the port function select bit to use the general purpose I/O port pin as the
T8OSC1 output pin. For detailed information on pin function switching, see the "I/O Ports (P)" chapter.
S1C17624/604/622/602/621 TeChniCal Manual
Division ratio selection
Gate
T8ORST
T8ORUN
T8ORMD
control circuit
PWM output
control circuit
Figure 14.
1.1 T8OSC1 Module Configuration
Table 14.
i/O
Qty
O
1
PWM signal (non-inverted) output pin
Outputs the PWM signal generated by the timer.
Seiko epson Corporation
8-bit OSC1 Timer (T8OSC1)
Compare
match signal
Count
Duty
match signal
Interrupt
T8OIE
2.1 T8OSC1 Pin
Function
14 8-BiT OSC1 TiMeR (T8OSC1)
Compare data register
T8OSC1_CMP
Comparator
Up counter
T8OSC1_CNT
Comparator
PWM duty data register
T8OSC1_DUTY
Interrupt enable
14-1

Advertisement

Table of Contents
loading

This manual is also suitable for:

S1c17604S1c17622S1c17602S1c17621

Table of Contents