08-26-2016, 12:13 AM
(This post was last modified: 08-26-2016, 12:28 AM by KnReLe.
Edit Reason: note on backlighting
)
Looks from the pictures that the LCD is connected to the SBC via an MCP23017 to the main i2c bus (pins 3 and 5). Thus I would expect that the connections are ok. The MCP23017 although it runs on 5V uses open-drain on its i2c lines, so these can be used on a 3.3V system such as the Raspberry Pi or Pine A64 without deleterious effect.
This i2c bus will be the one visible as /dev/i2c-1, so the i2cdetect -y 1 command is the one looking in the right place.
But there is another important difference between the PineA64 and the Raspberry Pi when it comes to the main i2c bus, the one on the PI-2-BUS connector pins 3 and 5. Raspberry Pi has a pair of 1.8 kilo-ohm pull-up resistors on these lines, and the Pine does not have these. So to make things work, I would suggest adding external resistors to make up for the ones missing. They don't have to be as low as 1.8 kOhms, something like 3.3 kOhms will work fine. One goes between pin 3 and pin 1, the other between pin 5 and pin 1, to pull the two i2c lines up to 3.3 V.
The internal pull-up resistors inside the Pine are 100 kOhm nominal, and this large a resistance does not allow for enough current to operate an i2c bus reliably.
The backlight on the LCD is driven from three of the IO pins on the MCP23017, one each for red (A6), green (A7), and yellow (B0); and all of it gets its 5V power supply via the pin 2.
This i2c bus will be the one visible as /dev/i2c-1, so the i2cdetect -y 1 command is the one looking in the right place.
But there is another important difference between the PineA64 and the Raspberry Pi when it comes to the main i2c bus, the one on the PI-2-BUS connector pins 3 and 5. Raspberry Pi has a pair of 1.8 kilo-ohm pull-up resistors on these lines, and the Pine does not have these. So to make things work, I would suggest adding external resistors to make up for the ones missing. They don't have to be as low as 1.8 kOhms, something like 3.3 kOhms will work fine. One goes between pin 3 and pin 1, the other between pin 5 and pin 1, to pull the two i2c lines up to 3.3 V.
The internal pull-up resistors inside the Pine are 100 kOhm nominal, and this large a resistance does not allow for enough current to operate an i2c bus reliably.
The backlight on the LCD is driven from three of the IO pins on the MCP23017, one each for red (A6), green (A7), and yellow (B0); and all of it gets its 5V power supply via the pin 2.