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

0 Members and 1 Guest are viewing this topic.

Offline anishkgt

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: qa
    • George Hobby
I2C Display freezing after power ON
« on: August 15, 2018, 08:25:37 pm »
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.
https://georgehobby.wordpress.com/
Test Gear: Rigol DS1054z, Hakko Fx88D, Brymen BM869s, Brymen 235
 

Online HB9EVI

  • Regular Contributor
  • *
  • Posts: 238
  • Country: ch
Re: I2C Display freezing after power ON
« Reply #1 on: August 15, 2018, 11: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 anishkgt

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: qa
    • George Hobby
Re: I2C Display freezing after power ON
« Reply #2 on: August 16, 2018, 01:26:35 am »
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
https://georgehobby.wordpress.com/
Test Gear: Rigol DS1054z, Hakko Fx88D, Brymen BM869s, Brymen 235
 

Offline lamello

  • Contributor
  • Posts: 21
  • Country: nl
Re: I2C Display freezing after power ON
« Reply #3 on: August 16, 2018, 03:45:49 am »
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 anishkgt

  • Frequent Contributor
  • **
  • Posts: 701
  • Country: qa
    • George Hobby
Re: I2C Display freezing after power ON
« Reply #4 on: August 16, 2018, 05:28:22 am »
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
https://georgehobby.wordpress.com/
Test Gear: Rigol DS1054z, Hakko Fx88D, Brymen BM869s, Brymen 235
 

Offline lamello

  • Contributor
  • Posts: 21
  • Country: nl
Re: I2C Display freezing after power ON
« Reply #5 on: August 16, 2018, 07:38:32 am »
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