Overall, the module converts a high-speed clock signal into a PWM signal with adjustable frequency and duty cycle. The user receives a high-frequency clock signal and, through a frequency divider, generates a lower-frequency clock. Then, they control the high duration of the PWM signal using buttons that increase or decrease the duty cycle value.
A 5kHz signal is received; the 6-bit divider only accepts numbers from 2 to 63 (decimal). The possible output frequencies for the PWM range from 2500Hz (5kHz/2) to 79Hz (5kHz/63), which can be used in different electronic components such as RGB LEDs, servomotors, stepper motors, sensors, and other circuits.
Recommendation: Use the PWM signal only as a control signal; the power supply for the devices it is applied to should come from an external power source.
The PWM output should go to a PMOD to have that control signal available on a device.
# | Input | Output | Bidirectional |
---|---|---|---|
0 | increase_duty | pwm_out0 | |
1 | decrease_duty | pwm_out1 | |
2 | divisor[0] | pwm_out2 | |
3 | divisor[1] | pwm_out3 | |
4 | divisor[2] | pwm_out4 | |
5 | divisor[3] | pwm_out5 | |
6 | divisor[4] | pwm_out6 | |
7 | divisor[5] | pwm_out7 |