Go Down

Topic: Troubleshooting an i2c 16x2 LCD - no data seen (Read 825 times) previous topic - next topic

anishkgt

It takes 10ms to reach 5v when powered by the mains.

bperrybap

It takes 10ms to reach 5v when powered by the mains.
Ok. That might be an issue with the 5ms delay in setup() but shouldn't be an issue if you bumped it to 500ms.

The code currently reports "Shorted" if it reads a LOW on the SCL pin when the pullup is enabled.
So you can ignore the "Shorted" message.
This will be fixed in the next release of the library such that it will only test for shorts when there is not a pin stuck low.

The questions becomes why is the SCL pin (Arduino digital pin 19)  reading as low when the Internal AVR pullup is enabled?
I also can't figure out why two i2c slaves show up at addresses 0x20 and 0x24 (from post 11)

What voltage do you see on the SCL / Arduino digital pin 19?

--- bill

anishkgt

SCL reads 0.020v with the LCD connected and 5.0v when disconnected. Could it be because the traces are not far enough from each other or could there be some interference.

These readings where taken with my sketch with internal pullups enabled and pullup resistors on the LCD as well.

Paul__B

I've not ignored your correction on the contrast pot. I've not left any pin floating one connected to 5v and the other pin to GND. The sweep is connected to pin Vo
So you didn't actually read what I stated then?  :smiley-eek:

OK, I do realise you are having troubles getting your board to work and I admit this is not a big problem, certainly not anything to do with your present problem, so you looked at it and your mind was entirely elsewhere, nothing "sank in".   :smiley-roll-sweat:

bperrybap

SCL reads 0.020v with the LCD connected and 5.0v when disconnected. Could it be because the traces are not far enough from each other or could there be some interference.

These readings where taken with my sketch with internal pullups enabled and pullup resistors on the LCD as well.
That is a problem.
It kind of looks like something is shorted like maybe a bad trace or perhaps something is not connected properly to create a short.
Look closely at the traces that go between the PCF8574 SCL pin 14 through the resistor as it connects to VCC.

--- bill

anishkgt

ok will have a look at it. Seems like the Atmel is stuck half way through when booting with the LCD connected. When the LCD is disconnected it completes the boot. I know it because in my sketch, once booted and audible feedback is heard.

anishkgt

Quote
********************************************************************
Serial Initialized
--------------------------------------------------------------------
I2CexpDiag - i2c LCD i/o expander backpack diagnostic tool
--------------------------------------------------------------------
hd44780 lib version: 1.0.1
--------------------------------------------------------------------
Reported Arduino Revision: 1.8.7
CPU ARCH: AVR - F_CPU: 16000000
--------------------------------------------------------------------
SDA digital pin: 18 A4
SCL digital pin: 19 A5
--------------------------------------------------------------------
Checking for required external I2C pull-up on SDA - YES
Checking for required external I2C pull-up on SCL - YES
Checking for I2C pins shorted together - Not Shorted
--------------------------------------------------------------------
Scanning i2c bus for devices..
 i2c device found at address 0x20
Total I2C devices found: 1
--------------------------------------------------------------------
Scanning i2c bus for all lcd displays
 LCD at address: 0x20 | config: P45601237H | R/W control: Yes
Total LCD devices found: 1
--------------------------------------------------------------------
LCD Display Memory Test
Display: 0
 Walking 1s data test:   PASSED
 Address line test:   PASSED
--------------------------------------------------------------------
Each working display should have its backlight on
and be displaying its #, address, and config information
If all pixels are on, or no pixels are showing, but backlight is on, try adjusting contrast pot
If backlight is off, wait for next test
--------------------------------------------------------------------
Blinking backlight test: to verify BL level autodetection
If backlight is mostly off but
you briefly see "BL Off" on display with backlight on,
then the library autodetected incorrect BL level
and the library cannot autoconfigure the device
--------------------------------------------------------------------
Displaying 'uptime' on all displays
--------------------------------------------------------------------
Turned out to be that the SCL and RS traces were shorted. Cleared it and all looks good in Diagnostic report.

Go Up