COUNTER A
S3C80A5B
12-4
Counter A Data Low-Byte Register (CADATAL)
F5H, Set 1, R/W
.7
.6
.5
.4
.3
.2
.1
.0
MSB
LSB
Reset Value : FFh
Counter A Data High-Byte Register (CADATAH)
F4H, Set 1, R/W
.7
.6
.5
.4
.3
.2
.1
.0
MSB
LSB
Reset Value : FFh
Figure 12-3. Counter A Registers
COUNTER A PULSE WIDTH CALCULATIONS
t
LOW
t
HIGH
t
LOW
To generate the above repeated waveform consisted of low period time, t
LOW
, and high period time, t
HIGH
.
When CAOF = 0,
t
LOW
= (C 2) x 1/fxx, 0H < CADATAL < 100H, where fx = The selected clock.
t
HIGH
= (C 2) x 1/fxx, 0H < CADATAH < 100H, where fx = The selected clock.
When CAOF = 1,
t
LOW
= (C 2) x 1/fxx, 0H < CADATAH < 100H, where fx = The selected clock.
t
HIGH
= (C 2) x 1/fxx, 0H < CADATAL < 100H, where fx = The selected clock.
To make t
LOW
= 24 us and t
HIGH
= 15 us. f
OSC
= 4 MHz, fx = 4 MHz/4 = 1 MHz
[Method 1] When CAOF = 0,
t
LOW
= 24 us = (C 2) /fx = (C 2)
×
1us, CADATAL = 22.
t
HIGH
= 15 us = (C 2) /fx = (C 2)
×
1us, CADATAH = 13.
[Method 2] When CAOF = 1,
t
HIGH
= 15 us = (C 2) /fx = (C 2)
×
1us, CADATAL = 13.
t
LOW
= 24 us = (C 2) /fx = (C 2)
×
1us, CADATAH = 22.