Serial I2C LCD 1602 Module (HCARDU0023)

LCD, TFT, OLED, LED modules
javiec
Posts: 2
Joined: Tue Aug 18, 2015 5:25 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by javiec » Tue Aug 18, 2015 5:37 pm

Hello, I have problems with my new LCD I2C adquiring today.

The first of all, We try to use the Address 0x27 and this is wrong, I have used the Detecting i2c and It show 0x3F.

I tried to use the two different Library, the attach in the first post and LiquidCrystal_V1.2.1 and in both cases the Display only turn on the blue light but it doesn't show the message.

I'm use the Example project in both cases.

What can we do?

I would rather use the LiquidCrystal_V1.2.1.

Thank you very much.

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

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by andrew » Wed Aug 19, 2015 7:04 am

Currently shipped screens have a slightly modified I2C adaptor board on the back of them that defaults to 0x3F. I will add a note about this to the first post.

For your problem you will need to use the V2.1 library from the first post. Don't use a library from anywhere else even if it has the same version number. Also make sure that you don't have any other versions of the library in your Arduino's library folders as it may be using the wrong version. Finally have you tried adjusting the blue pot on the back of the I2C board? This sets the contrast and if it's in the wrong position you won't see any text.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

javiec
Posts: 2
Joined: Tue Aug 18, 2015 5:25 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by javiec » Wed Aug 19, 2015 8:02 am

andrew wrote:Currently shipped screens have a slightly modified I2C adaptor board on the back of them that defaults to 0x3F. I will add a note about this to the first post.

For your problem you will need to use the V2.1 library from the first post. Don't use a library from anywhere else even if it has the same version number. Also make sure that you don't have any other versions of the library in your Arduino's library folders as it may be using the wrong version. Finally have you tried adjusting the blue pot on the back of the I2C board? This sets the contrast and if it's in the wrong position you won't see any text.

Ok, now the LCD works properly. The blue pot is damage, I have replaced for new one and now we have data.

petera
Posts: 1
Joined: Tue Sep 08, 2015 5:40 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by petera » Sat Sep 12, 2015 3:36 pm

I just received the module HCARDU0023 with my Arduino Uno+ and I have it working. 3 hours ago I had never touched an Arduino or LDC1620 - (although I do have some experience of PC programming) - so it can't be too hard! Some of that is due to the good information on this site.

I would stress several important points made in the above discussion.
- I used the LiquidCrystal_I2C library mentioned at the top and ran the example sketch above.
- I installed the library as a zip file, having read the help pages about libraries in the Arduino IDE software. There is no need to unzip it, the IDE does that.
- The display didn't seem to be working until I found two simple hardware issues....
- My Gnd connection jumper wire wasn't connecting - the effect was that the program would hang at the init() line - ie as soon as it tried to talk to the LCD. (it didn't work when that was the only LCD line in the main loop). I used the I2C scanner sketch (easy to find - it's mentioned and linked in lots of places) and that also didn't work. Finally tweaking my nice firm-looking wires made it spring into life.
- Now the backlight worked but still no text. I had to turn the blue control pot on the interface board all the way clockwise to get clear text. Text is invisible if the pot is turned more than about 20% the other way.

On a more general note - device libraries (like this one) often don't explain themselves very well. They can lack a clear description of all the functions, which is a bit frustrating.

Peter A

Brixhamengineer
Posts: 2
Joined: Wed Oct 28, 2015 5:06 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by Brixhamengineer » Thu Oct 29, 2015 6:11 pm

I have just spent nearly a week trying to get a 4 pin LCD to work. In part my lack of experience was part of the problem in that I didn't place any confidence in what I was doing. No matter what I did with libraries, sketches, settings, nothing seemed to work.

I only sorted it this morning and wanted to share with you my experience in case other novices are going through the same frustrating learning experience.

The bottom line first....I bought 4 identical i2c lcd's. The problem lay with the 0x3F or 0x27 code. All 4 LCD's are identical in both layout and writing on them but only 2 work with 0x3F whilst the other identical LCD's used 0x27!!!!! I just happened to pick up one to use. It was only when on a hunch I swapped LCD and it worked. Then I tried all 4 and only 2 worked.

I contacted the supplier and they asked before I returned them if I would check that the small board was not pressed against the main lcd board. On inspection they were very tight so I levered them away but they still didn't work. I then copied the script and inserted both //LiquidCrystal_I2C lcd(0x27,16,2);
LiquidCrystal_I2C lcd(0x3F,16,2);

By uploading this code and isolating one of the settings I found two worked fine. Swapping them over and uploading the second option I found the 'defective' ones now worked and the first two stopped working. So the 4 LCD's identical in everyway operate in different settings!

Ironically if I had only purchased 1 I would have sorted it out within an hour. I must have just picked up the wrong one each time. Very frustrating. So aimed at other novices..the code below should work with the types I bought.....but you may need to disable one, then the other to find which works.

If I have posted this in the wrong area or not followed procedure's I apologise but below is the code that worked for me.

I must express some frustration that the industry produce identical LCD's that work on different code.

=============================================

/* FILE: ARD_LCD_HCARDU0023_I2C_Hello_World_Example.pde
DATE: 11/07/12
VERSION: 0.1

This is a simple example of how to use the Hobby Components I2C LCD module
(HCARDU0023). To use this module you will require the appropriate library
which can be downloaded from the following location:

http://forum.hobbycomponents.com/arduin ... ds_modules

This code also demonstrates the correct pin assignment for the LCD. When you
run this program you should see a greeting message appear on the display.


DEVICE PINOUT (SPI Interface):

PIN 1: GND
PIN 2: +5V
PIN 3: SDA - Connect to Arduino analogue PIN 4
PIN 4: SCL - Connect to Arduino analogue PIN 5


You may copy, alter and reuse this code in any way you like but please leave
reference to hobbycomponents.com in your comments if you redistribute this code. */


/* Include the SPI/IIC Library */
#include <Wire.h>
#include <LiquidCrystal_I2C.h>


/* Initialise the LiquidCrystal library. The default address is 0x27 and this is a 16x2 line display */

//LiquidCrystal_I2C lcd(0x27,16,2);
LiquidCrystal_I2C lcd(0x3F,16,2);



void setup()
{
/* Initialise the LCD */
lcd.init();
lcd.init();
}

/* Main program loop */
void loop()
{
/* Make sure the backlight is turned on */
lcd.backlight();

/* Output the test message to the LCD */
lcd.setCursor(0,0);
lcd.print("mikes-models.com");
lcd.setCursor(0,1);
lcd.print("*Hello everyone*");


/* Do nothing */
while(1);
}

I used the latest scripts used in this thread

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

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by andrew » Fri Oct 30, 2015 12:49 pm

Glad you managed to fix the problem. I should add for anyone reading this that you are one of our eBay customers and so the existence of the forum and the information in the first post isn't as obvious to you as it would be for a website customer. This is mainly due to that fact that it's against eBay rules for us to link to our support forum as it ultimately makes potential customers aware that we have a website. This is also frustrating for us as it means we don't have an easy way to inform our eBay customers that we have lots more information on our support forum. It's also one of a few reasons way we are slowly pulling out of eBay.

With regards to the LCD's there has been a recent update to the I2C adaptor board on the back of the screen that now allows the option to change it's address. This does mean however that it's default address has changed from 0x27 to 0x3F.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Brixhamengineer
Posts: 2
Joined: Wed Oct 28, 2015 5:06 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by Brixhamengineer » Fri Oct 30, 2015 11:00 pm

Thanks for clearing that up for me. I will have to make sure I keep your details if you leave eBay (and I don't blame you for doing so. The fees and PayPal cost are very high I know). It's good to see you supporting your customers.

Mike

colubridae
Posts: 12
Joined: Thu Jan 14, 2016 3:36 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by colubridae » Thu Jan 14, 2016 4:55 pm

I have just purchased an LCD 1602.
I am having problems making it work.

I have compiled and uploaded the sketch (the hello world one).
It compiles ok and loads ok but the text does not show on the screen.

I had the SRA/SCL from the LCD connected to A4 and A5 as mentioned in the sketch comments.
The screen just appeared blue, after turning the contrast pot, solid characters (i.e. all the dots in each character matrix turned on) appeared in the upper row (mine is 16 x 2)

I then read that for an arduino mega which is what I'm using I should connect SRA/SCL to pins 20 and 21. This I did, the compile and load still works but the screen is now dark (backlight off). (the screen lights up when power is first applied to the arduino - but then the screen goes dark)

Please help

:)


I have now got it working (I think I had messed up various params in code) but now works... Sort of


The problem I now have is that the statement lcd.print("HELLO WORLD"); only prints the first char of the constant. If I then send an lcd.print("ELLO world"); the E appears correctly after the H and so on. It works but sending one char at a time is a pain.


Please help.

:)

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

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by andrew » Fri Jan 15, 2016 8:27 am

Strange, can you confirm the following things for me:


That you are using the library in the first post of this forum and that you don't have any other versions of library installed?

That you have tried the example sketch in the first post unaltered (apart from uncommenting the line with the correct I2C address and setting the correct pins for your Mega)?

Can you also check that the back of the I2C adapter board is not coming in contact with the back of the LCD module. Sometimes in shipping the adapter board can get pressed against the bottom of the LCD which will stop it from working properly.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

colubridae
Posts: 12
Joined: Thu Jan 14, 2016 3:36 pm

Re: Serial I2C LCD 1602 Module (HCARDU0023)

Post by colubridae » Fri Jan 15, 2016 11:30 am

andrew wrote:Strange, can you confirm the following things for me:


That you are using the library in the first post of this forum and that you don't have any other versions of library installed?

That you have tried the example sketch in the first post unaltered (apart from uncommenting the line with the correct I2C address and setting the correct pins for your Mega)?

Can you also check that the back of the I2C adapter board is not coming in contact with the back of the LCD module. Sometimes in shipping the adapter board can get pressed against the bottom of the LCD which will stop it from working properly.
Thanks for your prompt reply Andrew, :)


in answer to your questions:

1. I'm fairly sure that it is the correct library, however I will delete it and reload, just to be sure and get back to you.



2. I'm also fairly sure I did but I will retry just to be sure also get back to you.



3. I've checked the board and the GND pin seems to be just touching the rightmost top plastic retaining lug of the LCD screen itself (pokes through the lcd board). but it appears electrically isolated.

Post Reply