Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
PWM API module- beta version

 
Post new topic   Reply to topic    Forum Index -> Files
Author Message
spamiam



Joined: 13 Nov 2005
Posts: 665

Posted: 12 August 2006, 18:58 PM    Post subject: PWM API module- beta version Reply with quote

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



PWM_API.zip
 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)

Back to top
lightsaber



Joined: 30 May 2008
Posts: 1

Posted: 03 June 2008, 2:25 AM    Post subject: Reply with quote

nice work!

if you want to just use a plug and play PWM USB device with API (and autogenerated code for many languages), check out http://www.arfx.nl

I have a couple of their PWM USB interfaces power some light and fans on my arcade cabinet.

cheers!!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> Files Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group