I2CRead problem


Closed Thread
Results 1 to 10 of 10

Thread: I2CRead problem

Hybrid View

  1. #1
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: I2CRead problem

    can we see the whole transaction , an i2c read needs to do a write to set address and then a restart to read . you have not shown enough
    Warning I'm not a teacher

  2. #2
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: I2CRead problem

    Thank you Richard. Will do that this evening.

    I tried byte read, word read, page read, Nothing works and all var's are just a zero.

    The chip is a 16F1939 but I am sure this does not matter. Logic analyzer shows I2C activity either way.

    Edit:

    OK, now that is weird. On a 45K22 works just fine. On 1939 not...

    Ioannis
    Last edited by Ioannis; - 18th October 2018 at 13:22.

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: I2CRead problem

    I am very embarrassed...

    I forgot completely ANSELD and ANSELE when testing it...

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: I2CRead problem

    I forgot completely ANSELD

    Another good reason to migrate to xc8 , mcc gives all pin settings/names and function in one easy to use screen
    Attached Images Attached Images  
    Warning I'm not a teacher

  5. #5
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,115


    Did you find this post helpful? Yes | No

    Default Re: I2CRead problem

    It is not easy to me. I detest C lanquage. Despite my efforts so far, I did not managed to flip over.

    It looks very cryptic...

    Ioannis

  6. #6
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default Re: I2CRead problem

    Using ready-to-use tools to adjust the registers as we need, kills our ability of playing with them, and lowers the understanding of the hardware registers.

    Manual setting as much as possible is a good way of self developing, I think.
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  7. #7
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: I2CRead problem

    Using ready-to-use tools to adjust the registers as we need, kills our ability of playing with them, and lowers the understanding of the hardware registers.
    setting pin function is pic 101 stuff , but essential to get correct .not much programming skill in there once a basic understanding is reached

    Manual setting as much as possible is a good way of self developing, I think.

    would you not use dt_ints or PicMultiCalc
    if there's a good tool use it ,I think
    Warning I'm not a teacher

Similar Threads

  1. Problem with I2Cread command for an 32 bits ADC
    By Pilou81 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 27th October 2011, 15:32
  2. Need help to get I2CRead woriking
    By w7ami in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 29th November 2007, 16:22
  3. Problem with I2Cread and I2CWRITE function
    By Tony85 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th June 2006, 20:03
  4. Problem with I2Cread and I2CWRITE function
    By Tony85 in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 6th June 2006, 18:32
  5. I2CRead / I2CWrite Problem?
    By koossa in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st October 2005, 18:26

Members who have read this thread : 1

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