Serial I2C LCD 1602 Module (HCARDU0023)

LCD, TFT, OLED, LED modules
andrew
Site Admin
Posts: 1292
Joined: Sun Aug 05, 2012 4:15 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by andrew » Mon Nov 15, 2021 1:24 pm

Is J3 on the schematic the pin header with the link attached ?
Yes that's correct. Removing the jumper will break the power (VCC) supply to the backlight.

Can you also advise a part number for the 4 core lead that is shown in the photo's ?
It's the following 4 way anti-reverse cable:

https://hobbycomponents.com/cables/68-4 ... cable-30cm


If you don't need it to be anti-reverse there are the following alternatives which can be stripped into 4 way pieces:

https://hobbycomponents.com/cables/648- ... cable-10cm

https://hobbycomponents.com/cables/114- ... cable-pack
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

RMurphy195
Posts: 2
Joined: Fri Oct 21, 2022 3:16 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by RMurphy195 » Fri Oct 21, 2022 6:13 pm

Having struggled a little getting this to work e.g. code bugs such as the line lcd.begin();, which gave the IDE indigestion until I found it should be lcd.begin(16,2);, and finding, using I2C Scanner that the address is 0x27, not 0x3F (mine has the 3 pads on the back), plus a few other bugs I can now move forward -

However - I can't seem to find a function refernce for the library, ideally in summary form. Is it essentially the same as this https://www.arduino.cc/reference/en/lib ... idcrystal/?

And - if there's an easier way to get the info rather than following the arduino pages one-by-one to cut and paste the info into a document, I'd be very happy!

Thanks - Richard

andrew
Site Admin
Posts: 1292
Joined: Sun Aug 05, 2012 4:15 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by andrew » Sat Oct 22, 2022 10:59 am

Having struggled a little getting this to work e.g. code bugs such as the line lcd.begin();, which gave the IDE indigestion until I found it should be lcd.begin(16,2);
Odd, I guess you must be using a version of the library from a different source. The version in the first post requires you to specify the screen size when you first create an instance of the library, not in the begin() function.

and finding, using I2C Scanner that the address is 0x27, not 0x3F
Yes that's correct, these screens come with the default address of 0x27 or 0x3F (see note in first post of this thread) depending on the version of backpack fitted.


However - I can't seem to find a function refernce for the library, ideally in summary form. Is it essentially the same as this https://www.arduino.cc/reference/en/lib ... idcrystal/?
That's correct again, the I2C version of the liquidcrystal library is derived from the standard parallel version so your best option is referencing that. Unfortunately I don't know of any better source for documentation.

If you want to get an idea of which commands the library supports you can also take a look at the LiquidCrystal_I2C.h library file which lists all the function prototypes it supports.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

RMurphy195
Posts: 2
Joined: Fri Oct 21, 2022 3:16 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by RMurphy195 » Sat Oct 22, 2022 4:16 pm

Hi Andrew, thanks for the prompt reply. Cut and paste it is then oh well ...

All working very well now thanks, and very pleased with it.

PS - Somehow my libraries got mixed up - I had one called "HCARDU0023_LiquidCrystal_I2C_V2_1" from somewhere, now done some juggling and the line "lcd.begin();" now works without the arguments. A bit of a learning curve on Arduino libraries I think ...

Post Reply

Return to “Display”