I2C with External Eeprom


Closed Thread
Results 1 to 16 of 16

Hybrid View

  1. #1


    Did you find this post helpful? Yes | No

    Default

    I guess i missed that one, sorry.

    But thanks anyway for your help

    .

  2. #2


    Did you find this post helpful? Yes | No

    Default

    Greetings,

    While reviewing my code i changed the I2C lines from :

    I2Cread SDA,SCL,CTW,mem,[x]

    to

    I2Cread SDA,SCL,CTW,mem.highbyte,mem.lowbyte,[x]

    to make it work.

    Sorry if i'm a bit stubborn ( just trying to learn ), but i re-made ( yes... re-made ) the search and as before almost every one mentions the I2C lines as follows :


    I2cwrite SDA,SCL,CONTROL,ADDR,[DATA]

    Posts like:
    http://www.picbasic.co.uk/forum/show...hlight=24lc512

    http://www.picbasic.co.uk/forum/show...hlight=24lc512

    http://www.picbasic.co.uk/forum/show...hlight=24lc512

    Including melanie's post

    http://www.picbasic.co.uk/forum/showthread.php?t=587

    The only one that mentions to separate the address in high and low somehow did not worked in that case

    http://www.picbasic.co.uk/forum/show...hlight=24lc512


    My question is just to try to understand

    Why is that the i2c line ( I2cwrite SDA,SCL,CONTROL,ADDR,[DATA] ) works with other pics ( yes...all my programs with 12F675 work ) and with the 16F88 does not ? Why with this pic i need to have the address separated with high and low byte ?

    Also ( question for skimask )
    In post # 7 you mention :

    Code:
    'cause I see a few flaws in your logic in the code written a few posts back.
    Can you please point where the flaws are so i can take a look at them ?

    Thanks

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by ruijc View Post
    Why is that the i2c line ( I2cwrite SDA,SCL,CONTROL,ADDR,[DATA] ) works with other pics ( yes...all my programs with 12F675 work ) and with the 16F88 does not ? Why with this pic i need to have the address separated with high and low byte ?
    Quite frankly, if it works, who cares?
    Actually, I don't remember the answer to that at the moment. I'll remember eventually...

    Also ( question for skimask )
    In post # 7 you mention :
    Code:
    'cause I see a few flaws in your logic in the code written a few posts back.
    Can you please point where the flaws are so i can take a look at them ?
    Thanks
    You'll figure it out... Suffice to say there's just MUCH better ways to do some things, more reliable, faster, longer, stronger, and so on...

  4. #4


    Did you find this post helpful? Yes | No

    Default

    I've had to make some changes in my logic to work with the new I2C lines ( low/high address ) but still maintained the generic structure.

    This was my priority #1

    After checking if it works will study on those flaws .

    I undestand your point of "if it works, who cares", but if we leave things like that we will never get to improve the codes to be more reliable, faster and shorter

    Dont you agree ?

    In the mean time, if you remember please let me know

    Thanks again
    .

Similar Threads

  1. I2C Master/Slave 16F88/16F767 working code
    By DanPBP in forum Code Examples
    Replies: 2
    Last Post: - 23rd October 2012, 23:31
  2. Can't read sequential addresses in external EEPROM
    By tjkelly in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 18th February 2010, 15:46
  3. Replies: 1
    Last Post: - 28th January 2010, 23:15
  4. Problem with I2C EEPROM addressing
    By Atom058 in forum General
    Replies: 14
    Last Post: - 3rd November 2009, 04:17
  5. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 22:07

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