S3C8245/P8245/C8249/P8249 8-BIT TIMER A/B
11-7
TIMER B 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 TBOF = 0,
t
LOW
= (TBDATAL + 2) x 1/fx, 0H < TBDATAL < 100H, where fx = The selected clock.
t
HIGH
= (TBDATAH + 2) x 1/fx, 0H < TBDATAH < 100H, where fx = The selected clock.
When TBOF = 1,
t
LOW
= (TBDATAH + 2) x 1/fx, 0H < TBDATAH < 100H, where fx = The selected clock.
t
HIGH
= (TBDATAL + 2) x 1/fx, 0H < TBDATAL < 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
When TBOF = 0,
t
LOW
= 24 us = (TBDATAL + 2) /fx = (TBDATAL + 2) x 1us, TBDATAL = 22.
t
HIGH
= 15 us = (TBDATAH + 2) /fx = (TBDATAH + 2) x 1us, TBDATAH = 13.
When TBOF = 1,
t
HIGH
= 15 us = (TBDATAL + 2) /fx = (TBDATAL + 2) x 1us, TBDATAL = 13.
t
LOW
= 24 us = (TBDATAH + 2) /fx = (TBDATAH + 2) x 1us, TBDATAH = 22.