I2C post write/read 10ms pause mandatory?


Closed Thread
Results 1 to 8 of 8
  1. #1
    xnihilo's Avatar
    xnihilo Guest

    Smile I2C post write/read 10ms pause mandatory?

    Hi,

    In PPB manual, it is sait we have to add a
    PAUSE 10
    after a I2CREAD or I2CWRITE
    In the 24LC08B datasheet, I read that something like 2ms are enough to write a page (16 bits) at once. Should I really add a 10ms pause after a write or a read or is it for safety for some specific conditions???

    Thank you

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by xnihilo View Post
    In PPB manual, it is sait we have to add a
    PAUSE 10
    after a I2CREAD or I2CWRITE
    In the 24LC08B datasheet, I read that something like 2ms are enough to write a page (16 bits) at once. Should I really add a 10ms pause after a write or a read or is it for safety for some specific conditions???
    Pause after a read? Why would you want to do that? Are you waiting for the heating pads to burn some skin or something?

    Pause after a write? Well, most likely since eeprom writes are internally timed and controlled by the eeprom itself. If you further read the eeprom datasheet, you'll probably find something about a BUSY bit. And you probably further find something about polling said bit to see if the internal write has been accomplished or not.

    PAUSE 10 - ....and a few paragraphs before that, the PBP manual reminds you to check the datasheet for the specific device you are using to find the timing details.

  3. #3
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Smile

    Datasheet p3:
    Write cycle time: 5ms
    Is that the 'dead' time before another write can take place?
    I have not included code for checking the flag telling the WRITE is finished but if I take in account the stated 5ms, I should be safe, shouldn't I?

    So I do not need to wait after a read? Okay, I gues it is beacause no data is modified but why should it take more time to write than to read?

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


    Did you find this post helpful? Yes | No

    Default

    5mSec is the max recommend, so you can't go wrong with that.

    No need to wait after I2CREAD.
    Steve

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

  5. #5
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Smile

    I always enjoy your answers, thank you very much.

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


    Did you find this post helpful? Yes | No

    Default

    Bienvenue!
    Steve

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

  7. #7
    Join Date
    Feb 2005
    Location
    Kolkata-India
    Posts
    563


    Did you find this post helpful? Yes | No

    Default Page Write

    Hi,

    Your datasheet should mention if your part supports page writes say in 128bytes. This means you can dump the entire 128bytes to your eeprom and wait 5mS or 10mS rather than 128 x 5 mS. I use this in one of my multichannel battery cell voltage logger/analyzer which needs to store data frequently
    Regards

    Sougata

  8. #8
    xnihilo's Avatar
    xnihilo Guest


    Did you find this post helpful? Yes | No

    Default

    You'r right, you can write a 16 bytes page at once. 5ms is the needed delay.

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. Old and beyond help ?
    By DavidFMarks in forum mel PIC BASIC Pro
    Replies: 46
    Last Post: - 11th December 2008, 15:23
  4. Fade out LEDs question
    By Sam in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 22nd June 2008, 10:50
  5. Help Quick Need to make code smaller
    By Programmednew in forum mel PIC BASIC Pro
    Replies: 41
    Last Post: - 25th January 2005, 03:46

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