Samsung S3C2440A User Manual

Page 291

Advertising
background image

S3C2440A RISC MICROPROCESSOR

PWM TIMER

10-7

PULSE WIDTH MODULATION (PWM)

Write

TCMPBn = 60

Write

TCMPBn = 50

Write

TCMPBn = 40

Write

TCMPBn = 30

Write

TCMPBn = 30

Write

TCMPBn = Next PWM Value

60

50

40

30

30

Figure 10-5. Example of PWM

PWM function can be implemented by using the TCMPBn. PWM frequency is determined by TCNTBn. Figure 10-5
shows a PWM value determined by TCMPBn.

For a higher PWM value, decrease the TCMPBn value. For a lower PWM value, increase the TCMPBn value. If an
output inverter is enabled, the increment/decrement may be reversed.

The double buffering function allows the TCMPBn, for the next PWM cycle, written at any point in the current PWM
cycle by ISR or other routine.

Advertising