SN8P2977
8-Bit Micro-Controller with Regulator, PGIA, 24-bit ADC
SONiX TECHNOLOGY CO., LTD
Page 83
Version 1.7
8.4 PWM0 MODE
8.4.1
OVERVIEW
PWM function is generated by TC0 timer counter and output the PWM signal to PWM0OUT pin (P1.1). The 8-bit
counter counts modulus 256 bits. The value of the 8-bit counter (TC0C) is compared to the contents of the reference
register (TC0R). When the reference register value (TC0R) is equal to the counter value (TC0C), the PWM output goes
low. When the counter reaches zero, the PWM output is forced high. The ratio (duty) of the PWM0 output is TC0R/256.
PWM duty range TC0C valid value TC0R valid bits value
MAX. PWM
Frequency
(Fcpu = 8MHz)
Remark
0/256~255/256
0x00~0xFF
0x00~0xFF
31.25K
Overflow per 256 count
The Output duty of PWM is with different TC0R. Duty range is from 0/256~255/256.
TC0 Clock
TC0R=00H
TC0R=01H
TC0R=80H
TC0R=FFH
0
1
128
254
255
……
……
0
1
128
254
255
……
……
Low
Low
Low
High
High
Low
High