Background
My junque box ("junque" means "fancy, high-class junk" ) contains several of those ubiquitous, PCF8574T-based LCD "backpack" I2C interface boards. But I have no generic I2C expander board, which I would like to use for connecting a 4x4 16-button keypad (using I2C).
The type of "backpack" boards that I have all look like this:
And the schematic is as follows (at least, I am pretty sure this is the correct schematic for the PCB shown above):
So I want to try to convert a LCD "backpack" into a generic 8-bit I2C expander, with all 8 bits available on (what used to be) the LCD connector pins.
Unfortunately for this project, PCF8574T signal P3 does not go directly to a LCD connector pin, but rather to the base of the switching transistor, to control the LCD backlight. So I want to remove the transistor and its 4.7K base pull-up resistor from the PCB, and then jumper a wire from the transistor base pad (on the PCB) to the LCD connector "DB0" signal (J1 pin 7). This would put the PCF8574T port signals P0 to P3 on J1 pins 4 to 7 (respectively), and PCF8574T signals P4 to P7 on J1 pins 11 to 14 (respectively).
For power saving (in case I ever want to battery-power my project), I would also remove the contrast control pot and the power indicator LED and/or its 1K resistor.
I am hoping that someone here might be familiar with this particular LCD Backpack board, and could answer a few questions.
Questions
-
There are three 4.7K resistors on the board (marked "472"): one for the transistor base pull-up and the other two for the I2C pull-ups. Am I correct to assume that the transistor's 4.7K base pull-up resistor is the one that is physically located (on the PCB) between the transistor and the power filter capacitor?
-
If I want to hang more devices on the I2C bus (e.g. a second LCD backpack that actually drives a LCD display
), should I remove the two I2C 4.7K pull-ups from one of the adapter (backpack) boards? (If so, then I would remove all three 4.7K resistors from the board I am using for the keypad.) I believe that the I2C spec calls for only one pull-up resistor on each of the SCL and SDA signals.
-
I am wondering if the various I2C libraries (e.g. Wire.h, TinyWireM.h, etc.) actually use the AVR's internal input pull-ups for use as the I2C pullups? If the internal pull-ups are within the correct range (??), then doing this would make sense, and elminate the need for external pull-up resistors on the I2C lines. If the libraries do this, then, perhaps, none of the I2C adapter boards should have any on the I2C pins. (??)
Thanks, in advance, for your help.