SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 56
Version 1.0
TIMER COUNTER 0 (TC0)
OVERVIEW
The timer counter 0 (TC0) is used to generate an interrupt request when a specified time interval has elapsed. TC0 has
an auto re-loadable counter that consists of two parts: an 8-bit reload register (TC0R) into which you write the counter
reference value, and an 8-bit counter register (TC0C) whose value is automatically incremented by counter logic.
Figure 8-1. Timer Count TC0 Block Diagram
The main purposes of the TC0 timer counter is as following.
8-bit programmable timer:
Generates interrupts at specific time intervals based on the selected clock frequency.
Arbitrary frequency output (Buzzer output):
Outputs selectable clock frequencies to the BZ0 pin (P5.4).
PWM function:
PWM output can be generated by the PWM1OUT bit and output to PWM0OUT pin (P5.4).
TC0R reload
data buffer
Fcpu
TC0enb
TC0C
8-bit binary counter
TC0 Time out
load
Aload0
Auto. reload
P5.4
÷
2
TC0out
Internal P5.4 I/O circuit
CPUM0
S
R
Compare
PWM0OUT
PWM
Buzzer
÷2
(8-TC0Rate)
INT0
(schmitter trigger)
TC0CKS
TC0R reload
data buffer
Fcpu
TC0enb
TC0C
8-bit binary counter
TC0 Time out
load
Aload0
Auto. reload
P5.4
÷
2
TC0out
Internal P5.4 I/O circuit
CPUM0
S
R
Compare
PWM0OUT
PWM
Buzzer
÷2
(8-TC0Rate)
INT0
(schmitter trigger)
TC0CKS