SN8P1600
8-bit micro-controller
PWM FUNCTION DESCRIPTION (SN8P1604 Only)
OVERVIEW
PWM function is generated by TC1 timer counter and output the PWM signal to PWM1OUT pin (P5.3). The 8-bit
counter counts modulus 256, from 0-255, inclusive. The value of the 8-bit counter is compared to the contents of the
reference register TC1R. When the reference register value TC1R is equal to the counter value TC1C, the PWM
output goes low. When the counter reaches zero, the PWM output is forced high. The low-to-high ratio (duty) of the
PWM1 output is TC1R/256.
All PWM outputs remain inactive during the first 256 input clock signals. Then, when the counter value (TC1C)
changes from FFH back to 00H, the PWM output is forced to high level. The pulse width ratio (duty cycle) is defined by
the contents of the reference register (TC1R) and is programmed in increments of 1:256. The 8-bit PWM data register
TC1R is a write only register.
PWM output can be held at low level by continuously loading the reference register with 00H. Under PWM operating, to
change the PWM’s duty cycle is to modify the TC1R.
Reference Register Value (TC1R)
Duty
0/256
1/256
2/256
.
0000 0000
0000 0001
0000 0010
.
.
.
1000 0000
1000 0001
.
128/256
129/256
.
.
.
1111 1110
1111 1111
254/256
255/256
0
1
..... 128 ..... 254 255
0
1
..... 128 ..... 254 255
TC1 Clock
Low
TC1R = 00H
High
Low
TC1R = 01H
TC1R = 80H
TC1R = FFH
High
High
Low
Low
SONiX TECHNOLOGY CO., LTD
Page 63
Revision 1.94