Preliminary
TC1R AUTO-LOAD REGISTER
SN8P1702A/SN8P1703A
8-bit micro-controller build-in 12-bit ADC
TC1R is an 8-bit register for the TC1 auto-reload function. TC1R’s value applies to TC1OUT and PWM1OUT functions.
Under TC1OUT application, users must enable and set the TC1R register. The main purpose of TC1R is as following.
ꢀ
ꢀ
Store the auto-reload value and set into TC1C when the TC1C overflow. (ALOAD1 = 1).
Store the duty value of PWM1OUT function.
TC1R initial value = xxxx xxxx
0DEH
TC1R
Bit 7
TC1R7
W
Bit 6
TC1R6
W
Bit 5
TC1R5
W
Bit 4
TC1R4
W
Bit 3
TC1R3
W
Bit 2
TC1R2
W
Bit 1
TC1R1
W
Bit 0
TC1R0
W
The equation of TC1R initial value is like TC1C as following.
TC1R initial value = N - (TC1 interrupt interval time * input clock)
Which N is determinate by code option: TC1_Counter
TC1_Counter
8-bit
N
256
64
Max. TC1R value
255
63
6-bit
5-bit
32
31
4-bit
16
15
ꢀ
ꢀ
Note: TheTC1R must small or equal than Max. TC1R value.
Note: The TC1R is write-only register can’t be process by INCMS, DECMS instructions.
SONiX TECHNOLOGY CO., LTD
Page 71
Revision 0.5