Puzzling issue with I2CWRITE to 24LC512


Closed Thread
Results 1 to 5 of 5

Hybrid View

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


    Did you find this post helpful? Yes | No

    Default

    You should post the code in which you read EEPROM back and display on LCD.

    Also, write cycle time for 24LC512 is stated to be 5ms max. in datasheet but I would make it 10ms.

    Also, if your circuit powered by less then 5V then you should slow down the lines to EEPROM.

    ------------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

  2. #2
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101


    Did you find this post helpful? Yes | No

    Default

    Thanks for your reply!

    "Also, write cycle time for 24LC512 is stated to be 5ms max. in datasheet but I would make it 10ms."

    Yep I know, I actually used 10ms at first, even changing it to 500ms for test purposes. Doesn't make any difference: when I use the subroutine alone it always work, but not in my main program.

    My circuit is powered by regulated 5V also...

    I have attached the complete code where the I2CWRITE routines are not working. I'm still working on it so it may not be the cleanest and needs a bit of tweaking, but everything else work.

    The part of the code where I read the eeprom is the subroutine "read_mode". This is also where I added lines to output the variables to LCD for debugging (they are now removed, but it worked as I could read correct values that I programmed manually with an I2C memory programmer).

    Still investigating on my side...
    Attached Files Attached Files

  3. #3
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101


    Did you find this post helpful? Yes | No

    Default

    Haha!!! got it!!

    Erratic operation lead me to think it was a software problem, but good think you takled about VCC!!

    I actually put my ajustable regulated powersupply and checked again... VCC was 7.5V!!! but everything else was working fine!

    I will have to check what's going on with my 7805, but in any case, when VCC = 5V, the EEPROM works, and i can retrieve the correct values :-)

    Well, as always it is super simple when you find it out! (took me 3 days though!!!).

  4. #4
    Join Date
    Dec 2007
    Location
    Paris
    Posts
    101


    Did you find this post helpful? Yes | No

    Default

    Project is done and working perfectly!

    It certainly have helped getting your opinion.
    Many thanks!

Similar Threads

  1. PIC 18F4550 and MCP23017
    By DaveC3 in forum Code Examples
    Replies: 12
    Last Post: - 4th December 2010, 14:01
  2. My I2CWRITE - timings and tricks
    By FinchPJ in forum Code Examples
    Replies: 5
    Last Post: - 3rd March 2008, 21:40
  3. I2CWRITE on a 24LC512
    By oslinux in forum mel PIC BASIC Pro
    Replies: 17
    Last Post: - 23rd March 2007, 16:22
  4. I2CWrite issue
    By robertmark68 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 20th September 2006, 01:30
  5. 18F1320 ... Strange Memory
    By Acetronics2 in forum mel PIC BASIC Pro
    Replies: 43
    Last Post: - 9th April 2006, 09: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