COUNTER A S3F80P5_UM_ REV1.00
COUNTER A PULSE WIDTH CALCULATIONS
t
LOW
t
HIGH
t
LOW
To generate the above repeated waveform consisted of low period time, tLOW, and high period time, tHIGH.
When CAOF = 0,
tLOW = (CADATAL + 2) × 1/Fx. 0H < CADATAL < 100H, where Fx = the selected clock.
tHIGH = (CADATAH + 2) × 1/Fx. 0H < CADATAH < 100H, where Fx = the selected clock.
When CAOF = 1,
tLOW = (CADATAH + 2) × 1/Fx. 0H < CADATAH < 100H, where Fx = the selected clock.
tHIGH = (CADATAL + 2) × 1/Fx. 0H < CADATAL < 100H, where Fx = the selected clock.
To make tLOW = 24 us and tHIGH = 15 us. fOSC = 4 MHz, FX = 4 MHz/4 = 1 MHz
[Method 1] When CAOF = 0,
tLOW = 24 us = (CADATAL + 2) / FX = (CADATAL + 2) x 1us, CADATAL = 22.
tHIGH = 15 us = (CADATAH + 2) / FX = (CADATAH + 2) x 1us, CADATAH = 13.
[Method 2] When CAOF = 1,
tHIGH = 15 us = (CADATAL + 2) / FX = (CADATAL + 2) x 1us, CADATAL = 13.
tLOW = 24 us = (CADATAH + 2) / FX = (CADATAH + 2) x 1us, CADATAH = 22.
12-4