SN8P2624
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 76
Version 0.3
8.3 TIMER/COUNTER 0 (TC1)
8.3.1 OVERVIEW
The TC1 is an 8-bit binary up counting timer with double buffers. TC1 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 INT1 from
P0.1 pin (Falling edge trigger). Using TC1M register selects TC1C’s clock source from internal or external. If TC1 timer
occurs an overflow, it will continue counting and issue a time-out signal to trigger TC1 interrupt to request interrupt
service. TC1 overflow time is 0xFF to 0X00 normally. Under PWM mode, TC1 overflow is decided by PWM cycle
controlled by ALOAD1 and TC1OUT bits.
The main purposes of the TC1 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
INT1 input pin.
)
Buzzer output
)
PWM output
Fcpu
TC1 Rate
(Fcpu/2~Fcpu/256)
INT1
(Schmitter Trigger)
TC1CKS
TC1ENB
CPUM0,1
TC1C
8-Bit Binary Up
Counting Counter
TC1R Reload
Data Buffer
Up Counting
Reload Value
TC1 Time Out
Compare
ALOAD1
R
S
TC1 Time Out
Auto. Reload
TC1 / 2
Buzzer
Internal P5.3 I/O Circuit
P5.3
PWM
PWM1OUT
TC1OUT
ALOAD1, TC1OUT
Load