hey all im using a PCF8574AP I2C with a standard LCD 20x4 and have some problem with back light
i try different settings in code
lcd.setBacklight(HIGH);
and
lcd.backlight();
put the problem is that after i put voltage or connect my device to arduino it initialization the back light its turning off
i have thought that i make some error connecting a transistor but its still the same
i connect the transistor following:
1.Emitter to +5 Voltage
2.Base to I2C pin 12 with a 1k resistor
3.Collector to my LCD pin 15 with a 50 ohm resistor and a test led connected parallel with a 4,7k resistor
does the lcd backlight work when you connect power to the back light , via a resistor if needed ( check your lcd schematics / data sheet, you do have them dont you )
does the IO pin of the I2c PCF8574AP your connecting too toggle as you expect ? do you have a test meter or a scope ?
if i connect the back light to resistor and +5V its working
after initialization the pin 12 OUTPUT on PCF8574AP are in LOW state
after i reset or restart arduino the backlight are on for a few seconds and they switch off and my data are pooping on my LCD
If back light come on then goes off after a bit,
my bet would be on either
a) your re programing the I2C expander.
b) your setting the IO pin to trisate or input, and the charge is slowly rising, try putting your meter on the pin.
im using a lib thats called LiquidCrystal_I2C to communicate with my LCD
i have measured the IO of the I2C pin and the voltage its not rising its HIGH (3,45V) for a 1 second and then LOW (0,0V)
the voltage on transistor emitter is 4,95V and on collector is 0,45V and when base has 0V so i assume its correct