|Shopping Cart Download Website|
|You are here: Teensy Teensyduino Libraries ShiftPWM|
ShiftPWM LibraryShiftPWM, by Elco Jacobs, creates many PWM outputs using only 3 signals and inexpensive shift register chips.
ShiftPWM uses only 3 signals to drive any number of shift register chips.
On Teensy LC, 3.0, 3.1, 3.2, 3.5, 3.6, SHIFTPWM_NOSPI must be defined. See the examples in File > Examples > ShiftPWM for details.
Example ProgramThe example code can be opened from the menu:
File > Examples > ShiftPWM > ShiftPWM_RGB_Example
CPU & On-Chip Resource UsageShifPWM uses timer1 and the SPI port to rapidly shift new data to all the pins. This consumes a large amount of CPU time. The ShiftPWM.PrintInterruptLoad() function gives information about how much CPU time is used.
ShifPWM lets you configure the number of 8 bit registers, and the number of PWM levels. As more registers are used and more levels are supported, more data must be shifted, which slows the refresh rate. These settings should be adjusted to for a good, flicker-free refresh rate.Circuit Board CAD Files were fabricated by Laen's PCB Group Order.
More DetailsPlease refer to the official ShiftPWM documentation for more details.