Re: ic2 display problems #arduino ??? #arduino

Arv Evans

Bill  KF7YXS

There are a number of different I2C libraries.  The word "different" is key because some function
calls are definitely different.  Beauty and curse of libraries is that there are so many different ones
that claim to serve the same purpose.

Analog Pins A4 and A5 seem to be normal for I2C interfaces.  The Atmel datasheet for a Mega-328
shows that A4 and A5 connect internally to the TWI (2-Wire Interface) circuitry.

However, there are exceptions where the TWI interface is not available.  In those cases you may
have to select a pair of digital pins and write your own bit-banging code to do the TWI protocol.

​An I2C interface usually requires 4.7K resistors as pull-up on the SDA and SCL leads.​  If you look at the
internal schematic for an OLED TFT display you will see that it only has pull-down current devices and no
pull-up components.  I fought with this for several days until I finally figured it out.  Enabling pull-up
function on the Arduino leads apparently is not adequate.  After adding the 4.7K pull-up resistors my display
came alive.

​If you want to have both LCD and TFT displays active it might be worthwhile to turn off the backlight on that
LCD when it is not needed.  This will decrease the amount of current drawn by that display.​


On Thu, Jun 14, 2018 at 4:17 PM Bill Watkins <kf7yxs@...> wrote:
Displays functional

On Jun 14, 2018, at 10:41, Jack Purdum via Groups.Io <jjpurdum@...> wrote:

I'm not sure, but I think the I2C interface expects to use A4 and A5 for the interface. One of the hardware guys can help you there.

Jack, W8TEE

On Thursday, June 14, 2018, 11:09:34 AM EDT, Bill Watkins <kf7yxs@...> wrote:

Thank you very much. 

Another question; should the original display still be enabled even though ic2 is programmed?  Not used at same time, but when swapped back the display acts as originally shipped. 



On Jun 14, 2018, at 09:43, Jack Purdum via Groups.Io <jjpurdum@...> wrote:

Have you tried the display with one of the examples from the library just to make sure that you've 1) got a working display, and 2) it's wired correctly. Often a problem is that there are numerous LiquidCrystal libraries and they are substantially different. Unfortunately, Dr. Lee didn't follow the convention that gives the download URL for the library on the same line as the #include. That suggests to me that he's using the library that is shipped with the Arduino IDE. Check any examples that your manufacturer has to see if they give the download URL for the library. Also, there is a library for I2C LCD's:

You might give that a try as I don't think the standard IDE library is for I2C displays.

Jack, W8TEE

On Thursday, June 14, 2018, 10:24:35 AM EDT, Bill Watkins <kf7yxs@...> wrote:

I have attempted to duplicate Ian Lee’s success. 1) I have latest firmware and manager. 2) tried 0x27 & 0x3F; neither makes a difference. Display manufacturer says 0x27 correct. 3) Checked voltages on bcc, sda, and scl; 4.48, 3.89, & 3.90 respectively.  4) display lights up and separate, new display lights up. No letters in either regardless address used. Unit still works and original display still works with ic2 settings when swapped back.


Join to automatically receive all group messages.