
Quantum SBC User Manual Rev A
www.diamondsystems.com
Page 69
15.9
PWM
Figure 9: PWM section
The pulse width modulator module (PWM) is used to generate signals with various time periods and frequency.
There are four channels each of which has a textbox for frequency and a track bar for setting the duty cycle. The
duty cycle can be changed dynamically by sliding the track bar when the pulse width modulator is enabled. After
entering the frequency (in
Hz) and duty cycle, click the “ON/OFF” button corresponding to the channel to enable
the PWM. If the PWM is already enabled, then clicking the button will disable the PWM. There are four LEDs, one
corresponding to each PWM channel, which indicates whether it is enabled or disabled. Green indicates enabled
and red indicates disabled. If the PWM cannot be enabled properly due to out of range input values, then it will
show the following message:
“Cannot generate PWM at this duty cycle and frequency.”
Output pins for different channels are as follows:
Channel #1: P1A/RC2 pin.
Channel #2: P1B/RE6 pin.
Channel #3: P1C/RE5 pin.
Channel #4: P1D/RG4 pin.
Please note that the input frequency must be greater than or equal to 608 Hz. Any frequency input less than this
is not permitted.