Issue #17 resolved
created an issue

Hi! I am using this connection:

Right now I am using this Library:

Is there any way to use new liquid crystal, without changing wire connections..

Comments (6)

  1. piccaso NA

    Hi josx!

    Did you use cjparish's library unmodified? Just had a quick look at the library and it looks like it would be possible to make LiquidCrystal_SR to behave the same way but looking at your circuit confused me.

    It differs from the one cjparish posted. With Enable always HIGH and RS not connected i don't know how the library should 'talk' to the display... Are you sure that you used this circuit?

  2. Francisco Malpartida repo owner

    @josx - the problem with all libraries for the SR is that they are very dependent on how they are wired to the LCD. On version 1.2.1, we are targeting to write a generic SR library that will cater for any 3 wire shift register configuration.

    The current LCD3_SR is very dependent on the wiring and will be deprecated very soon. For the new release, the only thing that you will have to do to support that wiring scheme is to call the constructor correctly.

    The LCD3_SR class, does support what you are looking to do, but has a different wiring scheme, therefore it will not work. Please look at the header file for connections.

  3. Francisco Malpartida repo owner

    Closes #20 - remove wait 1us during interrupt masking in loadSR. Not needed. Closes #19 - Added support for on/off commands Closes #18 - Set backlight initial state during initialization to off. Closes #17 - New SR3W class. Added documentation for new class Move some methods for the public interface of the LCD class to private, since they should never be called by the user.


  4. josx reporter

    mmm I cant make it work. A few things:

    1) First three params are Arduino pins, then EN,RW,RS from LCD I have R/W to Ground. Which pin i have to send?

    2) Default schema with ascii on header on LiquidCrystal_SR3W.cpp and LiquidCrystal_SR3W.h are different

    3) mode is hardcoded on init method with _displayfunction = LCD_4BITMODE | LCD_1LINE | LCD_5x10DOTS i have LCD_5x8DOTS

  5. Francisco Malpartida repo owner

    Hi josx,

    thanks for posting your queries and concerns with respect to the SR3W mode.

    I will be publishing the default schematic in the wiki for driving the SR3W class. In the mean time:

    1. If you use the default constructor the LCD has to be connected as follows:

    Default configuration:
        Shift register      LCD
        QA                  DB4
        QB                  DB5
        QC                  DB6
        QD                  DB7
        QE                  E
        QF                  Rs
        GND                 Rw

    Being the default constructors:

    LiquidCrystal_SR3W(uint8_t data, uint8_t clk, uint8_t strobe);

    Where data, clk and strobe are the digital IO pins connected to the shift register data, clk and strobe pins.

    I will change the documentation a bit to make it clear what are the expected parameters.

    I will also change the full pin mapping constructor comment to make it clearer.

    I will also change a bit of the helper headers to make it clearer how to connect the LCD and what.

    2 . Differences in the "ascii schematic": Nicely spotted, thanks for bringing it up. The good schematic is the one in the .h header file. I will be changing it for:

    //   +--------------------------------------------+
    //   |                 MCU                        |
    //   |   IO1           IO2           IO3          |
    //   +----+-------------+-------------+-----------+
    //        |             |             |
    //        |             |             |
    //   +----+-------------+-------------+-----------+
    //   |    Strobe        Data          Clock       |
    //   |          8-bit shift/latch register        | 74HC595N
    //   |    Qa0  Qb1  Qc2  Qd3  Qe4  Qf5  Qg6  Qh7  |
    //   +----+----+----+----+----+----+----+----+----+
    //        |    |    |    |    |    |    |    
    //        |11  |12  |13  |14  |6   |5   |4   (LCD pins)
    //   +----+----+----+----+----+----+----+----+----+
    //   |    DB4  DB5  DB6  DB7  E    Rw   RS        |
    //   |                 LCD Module                 |

    3. init method The init method is just an initializer for pins and IOs on every driver that initializes mainly the IO pins and some basic defaults of the LCD (these last ones will be over written during initialization. If you look at LCD.h, the begin method is the one that really initializes the library. Like in the standard Arduino library, it is the one that really does the initialization. It has a default parameter as follows that you can indeed change:

    void begin(uint8_t cols, uint8_t rows, uint8_t charsize = LCD_5x8DOTS);

    I will be pushing the comment changes that I have highlighted shortly to avoid confusion. Please bare in mind that this is just a release candidate and I was hopping to have it review before making it publicly available.

  6. Log in to comment