SN8P2740 Series
ADC, OP-amp, Comparator 8-Bit Micro-Controller
SONiX TECHNOLOGY CO., LTD
Page 84
Version 2.0
TC0PO=1, CM0SF=1: TC0ENB must be set as “1”. TC0 8-bit binary up counter is controlled by comparator
0 output edge condition. The trigger edge can be selected through CM0G bit. If comparator output edge
occurs, TC0 starts to count. If TC0 overflows, TC0 stops counting, TC0IRQ is issued, and TC0C reloads
new value from TC0R.
TC0C
Counter
Initial Value, TC0R=M
TC0ENB
TC0 overflows. TC0C reloads from TC0R.
TC0ENB is set by program.
TC0ENB is cleared by program.
TC0 stops counting. TC0C =
TC0R.
M
M+1
……
Comparator output signal.
CM0G=0, falling edge.
0xF
F
TC0IRQ
TC0IRQ is set as TC0 overflow.
TC0IRQ is cleared by program.
Comparator output signal.
CM0G=1, rising edge.
Pulse Generator.
TC0DIR=0
Pulse Generator.
TC0DIR=1