SN8F2280 Series
USB 2.0 Full-Speed 8-Bit Micro-Controller
8.4 TIMER/COUNTER 0 (TC0~TC2)
8.4.1 OVERVIEW
The TCn (n=0, 1, 2) is an 8-bit binary up counting timer with double buffers. TCn 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 TCnM register selects TCnC’s clock source from internal or
external. If TCn timer occurs an overflow, it will continue counting and issue a time-out signal to trigger TCn interrupt to
request interrupt service. TCn overflow time is 0xFF to 0X00 normally. Under PWM mode, TCn overflow is decided by
PWM cycle controlled by ALOADn (n=0, 1, 2) and TCnOUT bits.
The main purposes of the TCn timer are 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
)
)
SONiX TECHNOLOGY CO., LTD
Page 93
Version 1.1