SN8P2711A
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 91
Version 0.1
8.3 TIMER/COUNTER 1 (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 or Fosc controlled by TC1X8
flag to get faster clock source (Fosc). 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)
Fosc
TC1 Rate
(Fosc/1~Fosc/128)
TC1X8
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