I2CWRITE not writing anything on PIC18F45K80


Closed Thread
Results 1 to 40 of 69

Hybrid View

  1. #1
    Join Date
    Feb 2013
    Posts
    1,150


    Did you find this post helpful? Yes | No

    Default Re: I2CWRITE not writing anything on PIC18F45K80

    By the way, I have DS3231 hooked to another pins of same CPU.
    It also not working - no activity on SDA/SCL pins while performing I2CREAD.
    So maybe some config error?

  2. #2
    Join Date
    May 2013
    Location
    australia
    Posts
    2,666


    Did you find this post helpful? Yes | No

    Default Re: I2CWRITE not writing anything on PIC18F45K80

    So maybe some config error?
    if you mean its wiring error or the chips aren't what you say , probably

    schematic ?
    Warning I'm not a teacher

  3. #3
    Join Date
    Feb 2013
    Posts
    1,150


    Did you find this post helpful? Yes | No

    Default Re: I2CWRITE not writing anything on PIC18F45K80

    No, there is no wiring error and when using HIGH or LOW statements, I can pull these pins up and down as normal.
    I mean, maybe there is some config error for 18F, which prevents I2CREAD/I2CWRITE from working?

  4. #4
    Join Date
    May 2013
    Location
    australia
    Posts
    2,666


    Did you find this post helpful? Yes | No

    Default Re: I2CWRITE not writing anything on PIC18F45K80

    to be clear

    provided it is wired correctly and the chip is pcf8574 the original code works just fine
    Warning I'm not a teacher

  5. #5
    Join Date
    Aug 2011
    Posts
    457


    Did you find this post helpful? Yes | No

    Default Re: I2CWRITE not writing anything on PIC18F45K80

    Change CONFIG XINST setting to OFF.

    Very few compilers are compatible with ON

  6. #6
    Join Date
    Feb 2013
    Posts
    1,150


    Did you find this post helpful? Yes | No

    Default Re: I2CWRITE not writing anything on PIC18F45K80

    Yes, you were right!
    Also XINST messes with LCDOUT.
    When XINST=ON, then DEC/HEX/BIN etc. modifiers of LCDOUT statement do not work.

    But why this is not mentioned in manual?
    Also, turning off XINST means we're turning off these extended instructions of 18F, so loosing all advantages these series have?

  7. #7
    Join Date
    Aug 2011
    Posts
    457


    Did you find this post helpful? Yes | No

    Default Re: I2CWRITE not writing anything on PIC18F45K80

    XINST changes the way some instructions work, so unless you have a compiler that supports it (like almost none), always set it off.

    You're not missing out on anything.

Similar Threads

  1. DT_Ints with PIC18F45K80 problem
    By Zapman in forum Code Examples
    Replies: 2
    Last Post: - 20th April 2022, 01:43
  2. Replies: 9
    Last Post: - 27th January 2015, 13:57
  3. PIC18F45K80 runs way to fast.
    By bmoe79 in forum PBP3
    Replies: 3
    Last Post: - 19th December 2014, 13:24
  4. I2CWrite issue
    By robertmark68 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th September 2006, 01:30
  5. I2CWRITE writing Strings to EEPROM
    By NavMicroSystems in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 27th March 2005, 19:45

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