Doc: can the R/W pin always be grounded?

Issue #85 closed
created an issue

In the "New LiquidCrystal / schematics" page on the wiki, every configuration ties the LCD R/W pin to the ground, except the I2C interface schematic, that controls it from an output of the I2C expander.

Is this an error? If so, I'd like to free a second output pin on the PCF8574 for another use (e.g. backlight control). Or is this the only configuration where the lib needs to actually read the display? (to poll the "busy" flag maybe?)

Thanks for your help! I know I could read the code (and probably will in the coming days), but having you giving a definite answer (and maybe editing the wiki) would help others, so I'm taking the chance! If you want, I may try to create a pull request if I succeed in adding code to control backlight through the I2C interface.


Comments (4)

  1. Francisco Malpartida repo owner

    Hi, the schematics are good. They are wired for future usage if needed for reading back the memory of the LCD. At least on the schematic published.

    The library is very flexible, so you can design your own LCD connection to the PCF8574. What you would need to use is the generic constructor mapping the pins as in the second example:

    // addr, en,rw,rs,d4,d5,d6,d7 LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7); // Set the LCD I2C address

    However, you will find that internally the library does indeed wire up the rw pin. In your branch, one thing that you can do for your use case is to create your own constructor without the rw pin mapped. You would initialise it like in the second example, but without the rw pin. That initialiser takes the form of the pins that are wired from the expander to the LCD.

    I have also tried brightness control using a PWM but it is not great. For some reason, lots of LCDs don't like it.

  2. daladim reporter

    Hi. Thanks for your reply. You are right, the constructors expect a RW pin, but it is not used, which means I can use this pin for another use. I might create a pull request to add new constructors without this RW pin (except that I'm a git guy. I have never used mercurial yet).

    Also, I read the lib and noticed that backlight control is already implemented! (at least a basic on/off. I have often read that using a PWM for backlight does not work great, and that filtering the PWM output might work better).


  3. Log in to comment