In this day and age, any B/L drawing more than 25mA is pretty poor design!!! You need that Transistor (or spare driver on a ULN2004 or similar if you're also driving relays and things)... but then that simplifies your B/L software...
Backlight var PortD.0
.. ..
High Backlight ' Turn ON B/L
Low Backlight ' Turn OFF B/L
You can also run the B/L through a spare Hardware PWM Channel... then you can vary the Brightness (as you can with Contrast) to the Users comfort preference. This is handly... B/L's wear out and age (especially the White LED types which tend to be driven at their extreemes)... if normal operation is about 40% of PWM, as it ages you can just increase the Brightness. Typically, white LEDs start to deteriorate after 2-3 years of continuous use... the Punter sends the unit back for repair because it's looking a bit 'dull', you increase the PWM up to 60% (via a secret software SETUP) and charge a few $$ for the repair... geeze... how many money-making business ideas can a girl give out on a public forum...
Bookmarks