ArduinoTroubleshooting

I2C LCD not working with Arduino Mega

userHead Davyx 2010-12-26 21:19:00 11171 Views7 Replies
Hi,

The I2C LCD display is working well with my Arduino Duemilanove.
But when I upload the same sketch to the Arduino Mega2560, the display doesn't work at all.

I've tried the examples from the LiquidCrystal_I2C library which are all working on the Duemilanove but not at all on the Mega.

The SDA and SCL pins are connected to the Analog inputs 4 and 5 on both Arduino.

Can it be the library which doesn't work with the Mega2560?
2022-05-29 20:42:07 First connect the ground of Arduino to the VSS of the LCD.Then connect the V0 of the LCD to the ground for full contrast.Then connect RW to the ground for selecting write mode.Then connect K , which is the ground of backlight LED also to the ground.Then connect the 5V of Arduino to the VDD of the LCD module.The Arduino Mega 2560 has a 5V I2C bus. You can connect a number of I2C devices to that bus, as long as those devices can handle a 5V I2C bus. For example the BMP085 sensor can handle only a 3.3V I2C bus. The I2C bus is a 'bus'.Insert your LCD screen into your breadboard vertically such that each pin has its own separate line on the board.Insert your potentiometer in the same way.Connect 5v and GND from Arduino to the / - rails on your breadboard. ...Connect Pins 1 and 16 from the LCD screen to the negative power rail.If the text is not displayed on LCD I2C, please check the following issues: Adjust the brightness of LCD by rotating potentiometer in the backside of LCD. Depending on manufacturers, the I2C address of LCD ordered from <a href=" https://couriertrackingfinder.com">couriertrackingfinder</a>  may be different. Usually, the default I2C address of LCD is 0x27 or 0x3F. userHeadPic colleencamacho59
2011-09-11 22:59:41 Mine goes the other way. It works fine on MEGA but not working on Due.
I have video posted to show the result.

[url=http://www.youtube.com/watch?v=Dfl6HTHLONU]http://www.youtube.com/watch?v=Dfl6HTHLONU[/url]
userHeadPic hardmouse
2010-12-28 13:06:04 :) userHeadPic Lauren
2010-12-28 00:18:49 I feel so stupid, I didn't noticed there were 2 SDA and SCL pins on the Mega. I was trying to connect them to the analog inputs.

Thanks a lot Laurent for your help, I just tried it and it works!
userHeadPic Davyx
2010-12-27 23:46:31 You could try to connect the SDA and SCL pins to th Digital pins 20(SDA) and 21(SCL) on the Mega.
Because these pins on the Mega are not in the same location as the I2C pins on the Duemilanove or Diecimila.
;)
userHeadPic Lauren
2010-12-27 17:52:05 Thank you  ;) userHeadPic Davyx
2010-12-27 17:13:12 OK. We will take a look at this issue.

userHeadPic R2D2C3PO