| ||
|
Shopping Cart
|
| Home | MP3 Player | 8051 Tools | All Projects | PJRC Store | Site Map |
|
You are here:
Teensy
| Search PJRC |
|
SoftPWM LibrarySoftPWM, written by Brett Hagman, can create additional PWM outputs on any pin. The signal frequency is relatively slow (default 30 Hz), which is mostly useful for controlling the brightness of LEDs.Download: SoftPWM.zip - Modified to work with Teensy 2.0 Hardware RequirementsSoftPWM can control up to 16 pins. Any digital pin may be used.
SoftPWM is compatible with Teensy 2.0 and Teensy++ 1.0 & 2.0. TODO: table showing which pins are no longer available as normal PWM. Teensy 2.0: pins 10 & 12. Teensy++ 1.0: pins 1 & 24. Teensy++ 2.0: pins 1 & 24. Basic UsageTODO: write thisExample ProgramTODO:CPU Usage & Interrupt LatencySoftPWM uses a timer and interrupt routine, which consumes considerable CPU time.TODO: actually measure CPU usage (maybe try changing the number of channels...) Latency sensitive libraries, like Servo and NewSoftSerial, will likely be disrupted by SoftPWM. More DetailsPlease refer to the official SoftPWM documentation for more details. |