SN8F2250B Series
USB 2.0 Full-Speed 8-Bit Micro-Controller
8.4 TIMER/COUNTER 0 (TC0)
8.4.1 OVERVIEW
The TC0 is an 8-bit binary up counting timer with double buffers. TC0 has two clock sources including internal clock
and external clock for counting a precision time. The internal clock source is from Fcpu. The external clock is INT0 from
P0.0 pin (Falling edge trigger). Using TC0M register selects TC0C’s clock source from internal or external. If TC0 timer
occurs an overflow, it will continue counting and issue a time-out signal to trigger TC0 interrupt to request interrupt
service. TC0 overflow time is 0xFF to 0X00 normally. Under PWM mode, TC0 overflow is decided by PWM cycle
controlled by ALOAD0 and TC0OUT bits.
The main purposes of the TC0 timer is as following.
)
)
8-bit programmable up counting timer: Generates interrupts at specific time intervals based on the selected
clock frequency.
External event counter: Counts system “events” based on falling edge detection of external clock signals at the
INT0 input pin.
Buzzer output
PWM output
)
)
TC0OUT
Internal P5.4 I/O Circuit
ALOAD0
Up Counting
Reload Value
Buzzer
TC0 / 2
Auto. Reload
TC0 Time Out
P5.4
TC0R Reload
Data Buffer
ALOAD0, TC0OUT
PWM
TC0 Rate
(Fcpu/2~Fcpu/256)
PWM0OUT
R
S
Compare
TC0CKS
TC0ENB
Fcpu
Load
TC0C
8-Bit Binary Up
Counting Counter
TC0 Time Out
INT0
(Schmitter Trigger)
CPUM0,1
SONiX TECHNOLOGY CO., LTD
Page 82
Version 1.1