Author Topic: I2C Display freezing after power ON  (Read 854 times)

0 Members and 1 Guest are viewing this topic.

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
I2C Display freezing after power ON
« on: August 15, 2018, 10:25:37 am »
I have an 16x2 lcd which works at first power on but does not update latter. I did not have pullup resistors for the SDA and SCL when i ordered the PCB. It worked without them as well but often strange characters would scroll, now all i did was add 10k pullup resistors on the SDA and SCL pins.

i replaced the PCF interface IC now the screen is completely blank as in solid blocks instead of the characters. It is not contrast either. Otherwise the Atmega IC works with the code.
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: I2C Display freezing after power ON
« Reply #1 on: August 15, 2018, 01:20:19 pm »
I2C requires pullups, since it's driven by an open drain circuit.

the PCF8574 is found in many lcd backpacks, works ok, but requires the right bus speed and the lcd requires the right timing, which is no so easy to achieve, if you write your lcd lib from the scratch

I bet it's a speed or timing issue. some more information about the project/code would be helpful.
 
The following users thanked this post: anishkgt

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: I2C Display freezing after power ON
« Reply #2 on: August 15, 2018, 03:26:35 pm »
About the pull-up resistors do they need to be near microcontroller or the interface IC ? The interface IC is on a another pcb connected by a 2x5 connector using a flat ribbon cable of length 15cm.


Www.Georgehobby.wordpress.com

Equipments: DSO104z, Hakko FX888D, Brymen BM869s
 

Offline lamello

  • Contributor
  • Posts: 25
  • Country: nl
Re: I2C Display freezing after power ON
« Reply #3 on: August 15, 2018, 05:45:49 pm »
The pull-up resisters don't have to be near the uC or interface IC. I use 4k7 or 3k3 resistors for the pull-ups.

If you have a scope, you could check if a high on the SDA and SCL is nearly 5Volt. If not, lower the resister value of the pull-up resistors.

Just my 2ct.

Greetings,

Lamello

 
The following users thanked this post: anishkgt

Offline anishkgtTopic starter

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: I2C Display freezing after power ON
« Reply #4 on: August 15, 2018, 07:28:22 pm »
The 10k resistors where taken from the Arduino schematic. never knew why they were there for but now i do.

Not sure what am looking at the scope but yes they SDA SCL are at 5v
 

Offline lamello

  • Contributor
  • Posts: 25
  • Country: nl
Re: I2C Display freezing after power ON
« Reply #5 on: August 15, 2018, 09:38:32 pm »
You have changed the PCF8574. Is the new chip really a PCF8574 or is it a PCF8574A?

The functionality of those chips are the same, with one exception. They have a different i2c address.
PCF8574   i2c address 0x27
PCF8574A i2c address 0x3F

Greetings

lamello


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf