The reason that these various i2c libraries are not working is that the library has to map output bits
on the PCF8574 to LCD functions. How that mapping needs to be done depends on the wiring on the PCB
between the PCF8574 and the other components.
Not all i2c lcd boards are wired the same. If the mapping being performed in the library is incorrect,
then it simply won't work.
The actual code works fine, but since the code is talking to the lcd on the wrong pins, nothing works.
Most libraries do not allow configuring this mapping since the mapping is hard coded.
fm's library allows you configure this mapping so
fm's library will work with that module as long as your correctly fill in the constructor
to match the wiring for that board.
The issue is that the constructor defines how the PCF874 is wired up to the hd44780 module.
If you use the examples that come with the library, it is unlikely to work since the examples
do not specify the bit/pin mappings. When the bit/pin mappings are not specified
the library will use a set of defaults that are for fm's EXTRAIO i2c board.
The board you have more than likely does not use the same wiring so you must fill in the full constructor
to tell the library how the PCF8574 chip is wired up to the LCD module.
In order to do that you need to know how the PCF8574 is wired up to the hd44780 module.
(what output bit is attached to each lcd function)
See fm's thread for more details on this at my post #116.http://arduino.cc/forum/index.php/topic,77120.msg1060211.html#msg1060211
A schematic would be most helpful as this information would then be clear.
From your photo I see that you have a 2TY transistor which is a PNP transistor so
the backlight polarity would be NEGATIVE.
The connections for all the output bits are not visible in the photo because
some of the traces are on the other side of the PCB.
Here is what can see:
P4 ???? (can't see in photo)
P5 ???? (can't see in photo)
P6 ???? (can't see in photo)
P7 Backlight Transistor
The backlight is on P7
The signals that can't bee seen are RW, RS/DI and E
Fms' board uses:
I assume you used the default constructor that does not specify all the bits.
If so then you can eliminate fm's 3 bit mappings above since they are not working
for your board.
The best thing would be to have a schematic so you could look at the output
bits on the 8574 chip to get the information to fill in the constructor.
The next best thing would be look at the board.
In this case the bottom of the board has the needed visual information.
De-soldering the board is going to be tough.
That leaves you with 2 choices:
- Ask the seller of the board for the information
Guessing is not really a good way of doing things as it can sometimes cause damage if
You can try guessing.
Just don't leave it hooked up too long. With these i2c boards, if it is correct,
it will spring to life immediately.
A fairly good/educated guess would be use the bit/pin mappings constructor for the mjkdz i2c backpack
noted in the newLiquidCrystal library linked to above.