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
Lighting LEDs

 
Post new topic   Reply to topic    Forum Index -> ZX-24
Author Message
abcuser



Joined: 27 Mar 2008
Posts: 13

Posted: 05 July 2008, 19:00 PM    Post subject: Lighting LEDs Reply with quote

I like to know is there any way to output a voltage of 2.5volts on Pins 5,6 and 7 to light up 3 LED's on the zx24a.
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR

Posted: 05 July 2008, 21:01 PM    Post subject: Re: Lighting LEDs Reply with quote

abcuser wrote:
I like to know is there any way to output a voltage of 2.5volts on Pins 5,6 and 7 to light up 3 LED's on the zx24a.
Being a digital device, there is no way to output a particular voltage other than logic 1 and logic zero.

That said, it is relatively easy to drive LEDs. Unless you have some special type of LED, you illuminate an LED by driving it with a certain current - the higher the current, the brighter the output (being careful not to exceed the maximum allowable current). I find it convenient to drive LEDs by connecting the anode to a current limiting resistor, the other side of which is connected to a +5V, and then connecting the cathode to an I/O pin. To illuminate the LED, the the I/O pin to logic 0 and current will flow. Setting the I/O pin high will turn off the LED.

You calculate the size of the current limiting resistor by the equation below.
Code:
Rlimit = (Vcc - Vf) / Iled
where Iled is the current that you want to flow through the LED and Vf is the "foward voltage" drop across the LED at that current. These values are obtained from the datasheet for the LED.

If you can provide a link to the datasheet for the LED in question we may be able to provide more specific information. Also, it would be helpful if you would explain why you believe that you need 2.5 volts.
Back to top
abcuser



Joined: 27 Mar 2008
Posts: 13

Posted: 06 July 2008, 0:25 AM    Post subject: Reply with quote

It worked, thanks. I did it using resistors
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZX-24 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