I2C I/O Expander PCF8574 hanging?


Closed Thread
Results 1 to 13 of 13

Hybrid View

  1. #1
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default I2C I/O Expander PCF8574 hanging?

    Has anyone ever experienced problems with a PCF8574 hanging or blocking the I2C bus?

    On one of my dataloggers I found that there had no data been logged for a number of days.

    Due to the large number of Digital Inputs I have to deal with there is a number of PCF8574S on Board.

    When I checked the system the PIC itself was running fine.
    No Watchdog or Brownout Reset had occured during the period of time where data shold have been, but wasn't logged.
    (There would have been a log entry, the RTC and Log-Memory are on a separate I2C-Bus)

    I flipped some Inputs (which should have caused Log entries) but nothing happened.
    (apart from the fact that the PIC responded to requests via RS232)

    After a Powercyle everything was fine again.

    To me it looks like the PCF8574 was hanging and required a Power OFF and ON.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    Hi Ralph,

    did you use the INT output to read them or do you read them in a loop?

    I had similar problem in the past but i used the INT pin to read them only when something change. I fix the problem by reading them in a loop.

    Well it can be many things but that's what happened to me.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    mmm, i know you do many industrial equipement so i don't know how it could be revelant but, is there's any chance that some 'high voltage noise' came on an input and freez the chip???

    I know that there's some diode inside but how efficient they are... i can't tell if they will beat 1N5817, UF1002-T or else like that.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  4. #4
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    There are opto isolators on every single pin, and the PCFs are being polled
    Last edited by NavMicroSystems; - 14th July 2005 at 11:57.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



  5. #5
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166

    Default

    NavMicroSystems, I have had this problem in the past and I found that if before reading the PCF8574's I reset the pins used for inputs to a high state the problem went away. I beleive the output register internal to the PCF8574's is being corrupted.

    Dave Purola,
    N8NTA

  6. #6
    Join Date
    Feb 2004
    Location
    Germany
    Posts
    762

    Default

    Dave,

    many thanks for the hint.

    Can you remember in detail how you solved the problem?

    The only way I see is to write $FF to the PCF right before reading it.
    regards

    Ralph

    _______________________________________________
    There are only 10 types of people:
    Those who understand binary, and those who don't ...
    _______________________________________________



Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 22:31
  2. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  3. I2C Master Slave issues.
    By cpayne in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 29th March 2008, 19:33
  4. MCP23016 I2C serial I/O expander chip
    By GeoJoe in forum Serial
    Replies: 7
    Last Post: - 31st October 2007, 15:39
  5. MCP23016 I/O expander
    By Demon in forum mel PIC BASIC Pro
    Replies: 42
    Last Post: - 24th October 2005, 01:01

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts