A20 User Manual (Revision 1.2) Copyright © 2013 Allwinner Technology Co., Ltd. All Rights Reserved. Page 102 / 812
1.8. PWM
1.8.1. Overview
The PWM signals can be used for LCD contrast and brightness control.
The PWM outputs a toggling signal, whose frequency and duty cycle can be modulated in its
programmable registers. Each channel has a dedicated internal 16-bit up counter, which will be reset
if it reaches the value stored in the channel period register. At the beginning of a count period cycle,
the PWMOUT is set to active state and counts from 0x0000.
The PWM divider divides the clock (24MHz) by 1~4096 according to the pre-scalar bits in PWM
control register.
PWM has two modes: in PWM cycle mode, the output will be a square waveform, and the frequency
is set to the period register; in PWM pulse mode, the output will be a positive pulse or a negative
pulse.