Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

i2c 16x4 lcd
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

i2c 16x4 lcd

by SimpleMan on Wed Feb 12, 2020 7:30 pm

Hello,

Last Dec. I purchased an Adafruit I2C Controlled + Keypad Shield Kit for 16x2 LCD[ID:715] for an arduino uno r3 based project. At the outset I was going to use a 16x2 display but decided to try using a 16x4 that I had lying around instead. The first two lines work fine with the Adafruit Hello World example, but the 3rd and 4th lines begin in the 5th column. Is there a library or work around that works properly for this configuration? From what I've read, the library seems to be the problem. I've tried many libraries with no success. Currently Adafruit_RGBLCDShield.h is the only library that gives me any degree of success. Any help will be appreciated.

Thank you.

SimpleMan
 
Posts: 2
Joined: Wed Feb 12, 2020 7:12 pm

Re: i2c 16x4 lcd

by SimpleMan on Thu Feb 13, 2020 3:58 pm

Due to lack of response and my own impatience I spent the necessary time to "solve" this on my own. For those who are interested I did the following:

Additional information: The display I am using is a Winstar 16x4 LCD Display Blue Negative Mode White LED Backlight WH1604A-TMI-JT

I downloaded the pdf on the display and discovered the following:

Display Character Address Code
Display Position 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
DD RAM Address 00 01                           0F
DD RAM Address 40 41                           4F
DD RAM Address 10 11                           1F
DD RAM Address 50 51                           5F

I then analyzed the Adafruit_RGBLCDShield.cpp file located in my arduino libraries folder, where I discovered the following line:
int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 };

I changed the line to look like this:
int row_offsets[] = { 0x00, 0x40, 0x10, 0x50 };

This appears to have solved my problem. I offer no guarantees this will solve your problem OR cause additional problems. Use at your own risk!

SimpleMan
 
Posts: 2
Joined: Wed Feb 12, 2020 7:12 pm

Please be positive and constructive with your questions and comments.