
Originally Posted by
DavyJones
What would the proper way to wire the LCD backlight to a port and setting that port so that it comes on. Currently I wired the backlight to +5v on the plus side and the minus side of the LCD backlight to portd.0. The LCD backlight is an LED. So to turn the backlight on I set LOW PORTD.0 which I understand and to turn it off I set it HIGH. This method puts +5vdc on the LED at all times. Of course it does not come on until I set portd.0 low which is understandable. I'm just trying to figure if this is standard way to hook something like this up. Can a variable be set to HIGH to end this confusion?
I'm sure this is a dumb simple question but I'll ask anyway.
Example:
_OFF = High
_ON = LOW
portd.0=_on
Thanks
David
Hi David,
It is not uncommon for devices to be "hot" and the controller provides ground, usually through a transistor (I am thinking back to my days as a mechanic) even those pretty excuse me lights on the top of opieDog's G ride are done that way. What you can do rather than using PORT HIGH to turn it off is tristate the port by TRIS 1 . The downside to this is you now have a noise antenna, so use plenty of bypass filters, caps, choke . . .
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks