2004 20x4 I2C Serial LCD Module (HCMODU0010)

LCD, TFT, OLED, LED modules
nigelmercier
Posts: 14
Joined: Sun Jan 05, 2014 12:40 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by nigelmercier » Sun Mar 20, 2016 9:31 am

Can the rows on this be combined to form large digits, perhaps using user defined characters?

[EDIT] Like this, but better :)

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

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by andrew » Mon Mar 21, 2016 11:07 am

Yes this would be possible. The sketch in the first post shows how to create your own custom characters. If you want to display a fixed piece of text then you could just create the custom characters for the text. If you want to display any text then this would be more complicated. You'd have to create custom character for every alphabetic character and then put them in something like a look up array or switch statement. You could then use each character in the string of text you wish to display to index the look up array or switch statement to get the appropriate custom graphic characters.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

darrelletherington
Posts: 3
Joined: Fri Mar 04, 2016 11:42 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by darrelletherington » Wed Mar 23, 2016 9:36 pm

Lovely module and works well but does anyone know when I can get a compatible bezel to fit this unit so I can add the finishing touches to a project?
Cheers.
Darrell.

DR49
Posts: 4
Joined: Wed Apr 13, 2016 6:21 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by DR49 » Thu Apr 14, 2016 2:44 pm

Hi
I am pretty happy to use my lcd 4 lines with my m0pro arduino, using your sketch and library.
Only point is that when I enter a long sentence (more than 20 characters), at the end of the first line the characters jump to the third line instead the second one ?
Does somebody could help ?
Thanks a lot
Dr49

Refer to the attached arduino sketch file
You do not have the required permissions to view the files attached to this post.

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

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by andrew » Thu Apr 14, 2016 4:02 pm

This is actually a 'quirk' of the IC (HD44780) that controls the display and is used in most LCD character displays. The controller IC has an area of memory where it stores the text to be displayed. However the controller is designed two work with several different formats of LCD, e.g, 16x2, 20x4, 40x2 but it doesn't know what format of LCD it is controlling so it doesn't know how to map its memory to the display. In the case of the 20x4 screen (2004) it maps the first 20 bytes, 0 - 19 to the first line of the display, bytes 20 to 39 to the 3rd line, bytes 40 to 59 to the second line, and finally bytes 60 to 79 to the fourth line.

Unfortunately I don't think there is any easy way around this, you will have to split the lines yourself and use the setCursor() function to position the text on the correct line.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

DR49
Posts: 4
Joined: Wed Apr 13, 2016 6:21 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by DR49 » Thu Apr 14, 2016 4:13 pm

Thanks Andrew !

It works using SetCursor function,

Not so complicated, in fact !

DenPit5
Posts: 15
Joined: Wed Oct 01, 2014 5:40 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by DenPit5 » Mon Apr 18, 2016 3:33 pm

I have previously had this display running OK but after having a problem in another part of my project I have to re-compile my Sketch. Now when I run the Sketch the I find that it only displays only the first character of the supplied text on each line of the display. Can you suggest what may be wrong ?

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

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by andrew » Mon Apr 18, 2016 3:59 pm

Could you try the example sketch in the first post. If it works it will help to rule out any hardware issues.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

darrelletherington
Posts: 3
Joined: Fri Mar 04, 2016 11:42 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by darrelletherington » Wed Jun 19, 2019 3:46 pm

Does anyone know if there is an updated library for this module that imports to the online Arduino editor? The one I have fails but can’t seem to find an updated version.
Thanks.

bobkoytc
Posts: 3
Joined: Sun Apr 18, 2021 12:53 pm

Re: 2004 20x4 I2C Serial LCD Module (HCMODU0010)

Post by bobkoytc » Sun Apr 18, 2021 2:40 pm

Display works nicely, once I'd figured out the I2C address.
The instructions in the first post say "If there a 3 sets of pads labelled A0, A1, & A2 then the default address will be 0x3F. If there are no pads the default address will be 0x27."
My board has no pads but the address is 0x3F.

The remaining problem I have is, no backlight.
I'm using the example given and the library from here, but no way can I turn the backlight on.
Am I missing something, or is it faulty?

Post Reply

Return to “Display”