Lighting LEDs
Lighting LEDs
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.
Re: Lighting LEDs
Being a digital device, there is no way to output a particular voltage other than logic 1 and logic zero.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.
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: Select all
Rlimit = (Vcc - Vf) / Iled
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.
- Don Kinzer