I2C blues


Closed Thread
Results 1 to 10 of 10

Thread: I2C blues

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I am sure you have checked, but are the connections to A0-A1-A2 solid?
    That output makes me wonder.
    Dave
    Always wear safety glasses while programming.

  2. #2
    Join Date
    Dec 2008
    Location
    Los Angeles, CA
    Posts
    156


    Did you find this post helpful? Yes | No

    Default

    You have the address configured as device 5. PortD.6 is SDA, PortD.5 is SCL. Is that correct? I always use 4.7K pullups on the I2C lines too. You might try making them a little less stiff.
    Last edited by circuitpro; - 11th December 2009 at 02:32.

  3. #3
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default 512k EEPROM

    Suggest you check:

    1. 4.7k pull-ups not 2.2k - may not make any difference but will elliminate a possibility. I know 10k pull-ups work at low speed but not 40MHz.

    2. Address you are using is: 101, are the chip pins set accordingly?

    3. A 512k EEPROM must have a word size address, is XX definately a word size variable?

    4. Is the write-protect pin grounded to enable writing?

    Regards Bill Legge

  4. #4
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

    Default

    I tried 10K pull-ups (no joy) and my program scanned all the addresses.

    For X = 0 to 7
    Address = $A0 + (X<<1)
    ...

    The internal device address ("command") was definitely a WORD variable.

    But I *DID* find something very interesting: Whenever the MSb (A2) of the EEPROM was brought high, the device stopped responding. Addresses $A0,$A2,$A4,$A6 all worked. $A8,$AA,$AC and $AE didn't. This happened on two separate devices (both were Microchip 24FC512's from the same lot).

    Tomorrow AM, I'll find out more.

    And for those playing with I2C, I found out the hard way that if you invoke DEFINE I2C_HOLD 1 and something holds SCL low (like a remote device with a diode clamp to ITS Vcc and it loses power), there is no timeout. Your program hangs forever. An email to MELABS support got me a quick answer (from a familiar person). Solution: if you are using the HOLD option, test for SCL HIGH before you invoke any I2CWRITE command.
    Charles Linquist

  5. #5
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default Blasted EEPROM

    CL,

    What is a 'MCC I2C analyzer?'

    Regards Bill Legge

  6. #6
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107


    Did you find this post helpful? Yes | No

  7. #7
    Join Date
    Nov 2007
    Location
    South-West of Australia. A small town called Denmark. 'Where the forest meets the sea.'
    Posts
    136


    Did you find this post helpful? Yes | No

    Default I2C Blues

    CL,

    Thanks - I've had a look at the site/product - a bit pricey for me as only an occasional/hobby I2C user. The Australian magazine 'Silicon Chip' had an I2C analysis board as a do-it-yourself project about a year ago. It used pretty mendane chips and some free Phillips software; I must give it a go.

    Can you run your system at 10MHz and see if that does the trick?

    Please let us know when/if you get it going. I spent ages getting familiar with EEPROM I2C and would like to learn what the problem was.

    Regards Bill legge

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. I2C slave
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th March 2008, 03:46
  5. Please help with i2cslave i2c slave
    By cycle_girl in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 1st December 2005, 13:55

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