cbmeeks wrote:
My design is using 5V logic. I have an LCD (40x4) that has 5V input. However, the data sheet specifies the LED backlight anode is +3.5V.
Since this is only to power the LED, and I didn't want to do level converters, I thought I could simply use a two resistor voltage divider.
R1 = 240 Ohm
R2 = 600 Ohm
Gives +3.571 according to
https://ohmslawcalculator.com/voltage-d ... calculator.
Will this work or is there a better way?
Thanks!
LCD:
https://newhavendisplay.com/content/spe ... TMI-JT.pdfI think you might be overthinking it a little.
These displays are just the common controller + LCD with an LED backlight. There is nothing special about the backlight - it's a panel made up from multiple LEDs wired in parallel (or sometimes 2 rows of 2 LEDs in series).
So it's just an LED and like all LEDs all you need is a single series resistor. You use Ohms law to calculate it, or like me, you get lazy and go online to e.g.
https://ledcalculator.net/#p=5&v=3.5&c=64&n=1&o=wand pick a 24Ω resistor (based on the typical current of the panel from the data sheet; 64mA in the range from 20 to 80mA).
With modern microcontrollers then what I do is drive the panel from a GPIO pin via PWM. Pick a resistor so that when the output is on it's driven to the max. brightness I then use PWM it to make it dimmer or turn it off. (Might need a little transistor or mosfet for the current though as some GPIO pins can't supply that current).
This is slightly harder but not impossible via a 1000Hz interrupt to a 65xx if it's running at (say) 8Mhz or more. I do this on my boards to give a pulsed heartbeat effect via an LED connected to the CB2 output.
-Gordon
_________________
--
Gordon Henderson.
See my
Ruby 6502 and 65816 SBC projects here:
https://projects.drogon.net/ruby/