I2CWRITE on a 24LC512


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default

    oslinux , I have used the 24lc512, 24lc515, 24lc1025 in pairs, to date with out any problem. One thing I did find is that if you are running interrupts during the read or write process I would sometimes have incorrect data ether read or written to the EEPROM. I disable all interrupts during the write process and I haven't had any problems since....

    Dave Purola,
    N8NTA

  2. #2
    Join Date
    Mar 2007
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    no i'm not using interrupts, but aniway i've placed a DISABLE before the write...

  3. #3
    Join Date
    Nov 2005
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    Try to split the word in 2 bytes;

    i2cwrite Sda,Scl,Ctrw,Addr,[TmpW.highbyte]
    pause 10
    Addr = Addr + 1
    i2cwrite Sda,Scl,Ctrw,Addr,[TmpW.lowbyte]
    pause 10
    Addr = Addr + 1

    Ciao

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    970


    Did you find this post helpful? Yes | No

    Default

    Hoping all is well with the hardware, you need to break the addr part into 2 bytes.

    I2cwrite SDA,SCL,CONTROL,I.HighByte, I.LowByte, [W0]

    I use this in my design and it works correctly with a 24c512

    Jerson

  5. #5
    Join Date
    Mar 2007
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    Solved Solved Solved Solved


    i tried splitting the address in two with no success, but

    i changed the resistors from 0,5W to 0,125W, from 2.2K to 4.7K and now it's working well!

    Thank you all for your support!

    Luca

  6. #6
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    it make no real sense but if it's working...

    How many years/decade/century your Proto-Board (breadboard) have?
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  7. #7
    Join Date
    Mar 2007
    Posts
    30


    Did you find this post helpful? Yes | No

    Default

    it's a breadboard from 4 years ago if i remember well, but it has been used for a lot of projects, and not only with wires of the right width!

    I'll use my new proto-board in a better way, I PROMISE

Similar Threads

  1. I2CRead & I2CWrite not working as expected
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 30
    Last Post: - 27th October 2021, 19:36
  2. PIC 18F4550 and MCP23017
    By DaveC3 in forum Code Examples
    Replies: 12
    Last Post: - 4th December 2010, 15:01
  3. Puzzling issue with I2CWRITE to 24LC512
    By aberco in forum General
    Replies: 4
    Last Post: - 22nd August 2008, 18:47
  4. My I2CWRITE - timings and tricks
    By FinchPJ in forum Code Examples
    Replies: 5
    Last Post: - 3rd March 2008, 22:40
  5. I2CWRITE and I2CREAD
    By Tomas in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd April 2004, 03:30

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