The way you have it wired is fine... providing you have a current limiting Resistor in series somewhere.


Backlight var PortD.0

LightON con 0
LightOFF con 1

.. ..

Backlight=LightON