Preliminary
TC0R AUTO-LOAD REGISTER
SN8P1702A/SN8P1703A
8-bit micro-controller build-in 12-bit ADC
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
TC0R
Bit 7
TC0R7
W
Bit 6
TC0R6
W
Bit 5
TC0R5
W
Bit 4
TC0R4
W
Bit 3
TC0R3
W
Bit 2
TC0R2
W
Bit 1
TC0R1
W
Bit 0
TC0R0
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
8-bit
N
256
64
Max. TC0R value
255
63
6-bit
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.
SONiX TECHNOLOGY CO., LTD
Page 60
Revision 0.5