SN8P2501D
8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 68
Version 1.5
8.2 TIMER 0 (T0)
8.2.1 OVERVIEW
The T0 timer is an 8-bit binary up timer with basic timer function. The basic timer function supports flag indicator
(T0IRQ bit) and interrupt operation (interrupt vector). The interval time is programmable through T0M, T0C registers
and supports RTC function. The T0 builds in green mode wake-up function. When T0 timer overflow occurs under
green mode, the system will be waked-up to last operating mode.
8-bit programmable up counting timer:
Generate time-out at specific time intervals based on the selected clock
frequency.
Interrupt function:
T0 timer function supports interrupt function. When T0 timer occurs overflow, the T0IRQ
actives and the system points program counter to interrupt vector to do interrupt sequence.
RTC function:
T0 supports RTC function and the clock source is from external low speed 32K oscillator when
T0TB=1.
RTC function is only available in High_Clk code option = "IHRC_RTC".
Green mode function:
T0 timer keeps running in green mode and wakes up system when T0 timer overflows.
Fcpu
T0 Rate
(Fcpu/2~Fcpu/256)
T0ENB
CPUM0,1
T0C 8-Bit Binary Up Counting Counter
T0IRQ Interrupt Flag
(T0 timer overflow.)
Load T0C Value by Program.
T0ENB
RTC
T0TB
Note: In RTC mode, don
’t reset T0C in interrupt service routine.