How to ensure that the PCF8574 functions properly?


+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    wirecut
    Guest wirecut's Avatar

    0 Not allowed!

    Default How to ensure that the PCF8574 functions properly?

    Every so often (every three / four hours of operation, sometime after one day) my circuit with the 18F4550 and the PCF8574 is not working properly. The PCF8574 hangs and is not responding to commands. The output pins remain fixed at the latest working command.

    The code I use is the following:

    Code:
    '-------------- declare I2C port for LCD -----------------------------------------------------
    ' Note! I2C is generated by bit banging so SDA\SCL pins are any output pin 
    Declare SDA_Pin = PORTD.6          'yellow
    Declare SCL_Pin = PORTD.7          'green
    'Declare Slow_Bus On                'original off 
    'Declare Hbus_Bitrate 100           'original 400
    DelayMS 100
    
    
    
    '===== SEND COMMAND ON I2C BUS ============================= 
    PCF8574Out:
      BusOut i2c_Address, [PCF8574_A0]      'send the command trought i2c to A0 device
      'HRSOut "PCF_A0=",  Dec3 PCF8574_A0, "   ",  Bin8 PCF8574_A0, 13, 10    
      DelayMS 100
    Return
    PCF8574_A0 contain the byte to be written.

    After a HW reset all return to work correctly.

    I have replaced the PCF8574 from Philips to the TI but the problem remain the same.

    The pull-uo resistor near the PCF8574 on line SDA and SCL are 4.7K.

    Any suggestion?
    Last edited by wirecut; 23rd November 2015 at 13:14. Reason: typing error

Attention

This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

The advertisements we display are relevant to this web site and your browsing history

Please consider supporting us by disabling your ad blocker.


Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

If you can, please report issues in the forum area WebSite / Forum Issues


Thank you for your attention.

  • #2
    Prolific Poster shantanu@india's Avatar
    Join Date
    Feb 2007
    Posts
    1,701
    Thumbs Up
    Received: 7
    Given: 21
    Total Downloaded
    827.23 MB

    0 Not allowed!

    Default Re: How to ensure that the PCF8574 functions properly?

    Hi,
    Maybe you can add a piece of code that verifies the communication status & resets the MSSP port by resetting the SSPCON1/SSPEN bit & setting it once again. This should re-establish the connection.
    Of course , for that you need to use the hardware MSSP module!!
    Shantanu

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  • #3
    Roshan
    Guest Roshan's Avatar

    0 Not allowed!

    Default Re: How to ensure that the PCF8574 functions properly?

    PCf8574 is support 100Khz clock & need minimum 4k7 or 10K pull up on sda & scl line. If you use value below then 4k7 it will not perform well.

  • Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

    Thread Information

    Users Browsing this Thread

    There are currently 1 users browsing this thread. (0 members and 1 guests)

       

    Similar Threads

    1. PIC 16F676 based Code is not working Properly
      By hmsahir in forum Proton Plus Compiler v3
      Replies: 4
      Last Post: 26th July 2016, 14:33
    2. [SOLVED !] Can't get Proton, MPLAB & ICD2 to work properly
      By RMathews in forum Proton Plus Compiler v3
      Replies: 0
      Last Post: 6th April 2011, 15:35
    3. [SOLVED !] DelayMS not working properly with new compiler
      By RMathews in forum Proton Plus Compiler v3
      Replies: 12
      Last Post: 24th June 2010, 22:15
    4. [SOLVED !] First New Post no longer working properly
      By cgriffin in forum Website / Forum Issues
      Replies: 10
      Last Post: 4th June 2009, 13:53
    5. mister e and pcf8574
      By BIDOUILLE in forum Proton Plus Compiler v3
      Replies: 0
      Last Post: 20th March 2006, 21:42

    Members who have read this thread since 22nd October 2019, 21:15 : 0

    Actions :  (Set Date)  (Clear Date)

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

    Tags for this Thread

    Posting Permissions

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