
PRELIMINARY
Pulse Width Modulation Timer
S3C6400 RISC MICROPROCESSOR
32-10
Preliminary product information describe products that are in development,
for which full characterization data and associated errata are not yet available.
Specifications and information herein are subject to change without notice.
INITIALIZE TIMER (SETTING MANUAL-UP DATA AND INVERTER)
Because an auto-reload operation of the timer occurs when the down counter reaches to 0, a starting value of
the TCNTn has to be defined by the user at first. In this case, the starting value has to be loaded by the manual
update bit. Take the following steps to start a Timer;
1) Write the initial value into TCNTBn and TCMPBn.
2) Set the manual update bit of the corresponding timer.
(Recommended setting the inverter on/off bit
(whether using inverter or not)).
3) Set the start bit of the corresponding timer to start the timer and clear only manual update bit.
PWM (PULSE WIDTH MODULATION)
Write TCMPBn=60
Write TCMPBn=50
Write TCMPBn=40
Write TCMPBn=30
Write TCMPBn=30
Write TCMPBn
=next PWM
60
50
40
30
30
Figure 32-8: Example of PWM
Note:
PWM feature can implement by using the TCMPBn. PWM frequency is determined by TCNTBn. A PWM value is
determined by TCMPBn as shown in the Figure 32-8.
For higher PWM value, decrease TCMPBn value. For lower PWM value, increase TCMPBn value. If output
inverter is enabled, the increment/decrement may be opposite.
Because of double buffering feature, TCMPBn, for a next PWM cycle, can be written in any point of current PWM
cycle by ISR.