skip navigational linksPJRC
Shopping Cart Checkout Shipping Cost Download Website
Home MP3 Player 8051 Tools All Projects PJRC Store Site Map
You are here: Teensy Teensyduino Libraries ShiftPWM

PJRC Store
Teensy 3.1, $19.80
Teensy 2.0, $16.00
Teensy++ 2.0, $24.00
USB Cable, $4.00
Teensy
Main Page
Teensy 3.1
Getting Started
How-To Tips
Code Library
Projects
Teensyduino
Reference

ShiftPWM Library

ShiftPWM, by Elco Jacobs, creates many PWM outputs using only 3 signals and inexpensive shift register chips.

Download: ShiftPWM.zip - 2012-Aug-15 version

Hardware Requirements


ShiftPWM Test Board, CAD Files Below

ShiftPWM uses only 3 signals to drive any number of shift register chips.

SignalTeensy 2.0Teensy++ 2.074VHC595
Clock12111
Data22214
Latch8812

Example Program

The example code can be opened from the menu:

   File > Examples > ShiftPWM > ShiftPWM_RGB_Example

CPU & On-Chip Resource Usage

ShifPWM 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.

Test Circuit Board

These Circuit Board CAD Files were fabricated by Laen's PCB Group Order.

More Details

Please refer to the official ShiftPWM documentation for more details.