SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 57
Version 1.0
TC0M MODE REGISTER
The TC0M is the timer counter mode register, which is an 8-bit read/write register. By loading different value into the
TC0M register, users can modify the timer counter clock frequency dynamically when program executing.
Eight rates for TC0 timer can be selected by TC0RATE0 ~ TC0RATE2 and TC0X8 bit of T0M register. If TC0X8=1 the
TC0 will faster 8 times than TC0X8 = 0(initial value). The 7
th
bit of TC0M named TC0ENB is the control bit to start TC0
timer.
TC0M initial value = 0000 0000
0DAH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
TC0M
TC0ENB TC0RATE2
TC0RATE1 TC0RATE0
TC0CKS ALOAD0 TC0OUT
PWM0OUT
R/W R/W R/W R/W R/W R/W R/W R/W
Bit7
TC0ENB:
TC0 counter/BZ0/PWM0OUT enable bit.
0 = disable,
1 = enable.
Bit[6:4]
TC0RATE[2:0]:
TC0 clock source selection bits. TC0X8 is 2
nd
bit of T0M register
TC0 Clock Source
TC0RATE [2:0]
TC0X8 = 0
TC0X8 = 1
000 F
CPU
/256 = F
OSC
/1024 F
OSC
/128
001 F
CPU
/128 = F
OSC
/512 F
OSC
/64
… …
…
110 F
CPU
/4 = F
OSC
/16 F
OSC
/2
111 F
CPU
/2 = F
OSC
/8 F
OSC
Note: F
CPU
= F
OSC
/ 4
Bit3
TC0CKS:
TC0 clock source select bit.
0 = F
CPU
,
1 = External clock comes from INT0/P0.0 pin.
Bit2
ALOAD0:
TC0 auto-reload function control bit.
0 = none auto-reload,
1 = auto-reload.
Bit1
TC0OUT:
TC0 time-out toggle signal output control bit.
0 = To disable TC0 signal output and to enable P5.4’s I/O function,
1 = To enable TC0’s signal output and to disable P5.4’s I/O function. (Auto-disable the PWM0OUT function.)
Bit0
PWM0OUT:
TC0’s PWM output control bit.
0 = To disable the PWM output,
1 = To enable the PWM output (The TC0OUT control bit must = 0 )
Note: When TC0CKS=1, TC0 became an external event counter. No more P0.0 interrupt request will be
raised. (P00IRQ will be always 0)