SN8P1829
8-Bit MCU build-in 12-bit ADC + PGIA + Charge-pump Reg 128 dots LCD driver
SONiX TECHNOLOGY CO., LTD
Page 61
Version 1.0
TC0R AUTO-LOAD REGISTER
TC0R is an 8-bit register for the TC0 auto-reload function. TC0R’s value applies to TC0OUT and PWM0OUT functions.
Under TC0OUT application, users must enable and set the TC0R register. The main purpose of TC0R is as following.
Store the auto-reload value and set into TC0C when the TC0C overflow. (ALOAD0 = 1).
Store the duty value of PWM0OUT function.
TC0R initial value = xxxx xxxx
0CDH
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
TC0R
TC0R7 TC0R6 TC0R5 TC0R4 TC0R3 TC0R2 TC0R1 TC0R0
W W W W W W W W
The equation of TC0R initial value is like TC0C as following.
TC0R initial value = N - (TC0 interrupt interval time * input clock)
Which N is determinate by code option: TC0_Counter
TC0_Counter
N
Max. TC0R value
8-bit 256
255
6-bit 64
63
5-bit 32
31
4-bit 16
15
Note: TheTC0R must small or equal than Max. TC0R value.
Note: The TC0R is write-only register can’t be process by INCMS, DECMS instructions.