SN8P2318 Series
C-type LCD, RFC 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 89
Version 1.5
8.4 T1 16-BIT TIMER WITH CAPTURE TIMER FUNCTION
8.4.1 OVERVIEW
The T1 timer is a 16-bit binary up timer with basic timer and capture timer functions. The basic timer function supports
flag indicator (T1IRQ bit) and interrupt operation (interrupt vector). The interval time is programmable through T1M,
T1CH/T1CL 16-bit counter registers. The capture timer supports high pulse width measurement, low pulse width
measurement, cycle measurement and continuous duration from P0.2/T1IN pin. T1 becomes a timer meter to count
external signal time parameters to implement measure application. The main purposes of the T1 timer are as following.
16-bit programmable up counting timer:
Generate time-out at specific time intervals based on the selected
clock frequency.
16-bit capture timer:
Measure the input signal pulse width and cycle depend on the T1 clock time base to decide
the capture timer’s resolution. The capture timer builds in programmable trigger edge selection to decide the
start-stop trigger event.
10-bit event counter:
The 10-bit event counter to detect event source for accumulative capture timer function.
The event counter is up counting design. When the counter is overflow, the T1 stops counting and the T1 counter
buffers records the period of event counter duration.
Interrupt function:
T1 timer function and capture timer function support interrupt function. When T1 timer occurs
overflow or capture timer stops counting, the T1IRQ actives and the system points program counter to interrupt
vector to do interrupt sequence.
Green mode function:
All T1 functions (timer, event counter, capture timer, auto-reload) keeps running in green
mode, but no wake-up function.
T1ENB
CPUM0,1
T1CH,L 16-Bit Binary Up Counting Counter
T1IRQ Interrupt Flag
(T1 timer overflow.)
(Capture timer stop)
CPTG[1:0] = 00, Disable. 01/10/11 = Enable.
CPTStart
T1CH
Buffer
T1CL
Buffer
Write T1CL Register
Read T1CL Register
CPTG[1:0]
CPTCKS
P0.2/T1IN
RFC Output
Signal
T1VC 10-bit Event Counter, Binary Up Counting Counter
CPTVC
T1VC Counter Overflow
CPTStart
Fcpu
T1 Rate
(Fcpu/1~Fcpu/128)
Fhosc
T1CKS