spamiam
Joined: 13 Nov 2005
Posts: 665
|
|
Posted: 12 August 2006, 18:58 PM Post subject: PWM API module- beta version |
|
|
Here is my beta version of my ZBasic module to create PWM on pins 26 and 27. Channel 1 is the green LED, so you can see the output. THe thing to remember is that the LED is ON when the pin output is LOW!!! It has the opposite logic of the pin.
Try it out and let me know how you like it.
The demo program is designed to have a voltage divider pot on pin 14. You also need to comment-out the #DEFINE for the Sparkfun LCD if you do not have one. The LCD API uses identical commands to the ZBasic LED display, so you could substitute that one if you have it.
Comment-in the #DEFINE DEBUGGING line to get more info sent back to the PC.
-Tony
| Description: |
| This allows the generation of variable frequency, variable duty factor square wave output on pins 26, 27 of the ZX-24. |
|
 Download |
| Filename: |
PWM_API.zip |
| Filesize: |
14.73 KB |
| Downloaded: |
3625 Time(s) |
|
|