Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

I2C Delay and writing issues

Status
Not open for further replies.

shaswat

Advanced Member level 4
Joined
Jul 2, 2013
Messages
115
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
963
Like everyone I start learning I2C before implementing in my code. As I have already a generic code in which I2C code has written. I know all the major concepts in I2C except some minor issues. These concepts I never get in any datasheet or in any discussion. I don't know whether its a place to ask this question or not.

My question is how fast can I write a data in memory using I2C. Basically the smallest time after which I write on my EEPROM is 4 sec. I want to know what happens if it would be less than 1 second or upto some milli-seconds. I want to check that after writing ten Lakh cycle in a particular location is it still able to update other value on that location . If suppose I want to update my location in some milli-seconds, then every time if I update my data then it would write the data on that location or it would skip the writing process?

Other thing is that how can I know how much amount of delay is provided in between the SCL and SDA. Is that delay is related to the MCLK or it is selected randomly?
 

How fast you can write to memory is going to depend on multiple factors, including your data rate and the maximum clock frequency your memory can support. Furthermore, the delay should also be configurable based on your implementation.

Regards,
Willis
 

How fast you can write to memory is going to depend on multiple factors, including your data rate and the maximum clock frequency your memory can support. Furthermore, the delay should also be configurable based on your implementation.

Regards,
Willis

I want to know those multiple factors as I want to implement the I2C in my code. Everytime I update my memory by 2 bytes or sometimes its 3 bytes that depends upon some tamper conditions if occurs in my system. Could you please elaborate more about these things Plzzz.
 

you should check the EEPROM's datasheet for time delay but i2c message carries its own acknowledge bit, so you can check that bit and if OK, go on to send. For more information read your compiler's manuel. i'm using this example from ccs c compiler's manuel:
Code:
int1 ext_eeprom_ready() {
   int1 ack;
   i2c_start();            // If the write command is acknowledged,
   ack = i2c_write(0xa0);  // then the device is ready.
   i2c_stop();
   return !ack;
}

but millisecond is much time for EEPROM operations it can send and store message in microseconds.
 

which eeprom are you using?
Did you read the datasheet?
 

Hi,
First thing there is no need of providing delay between the SDA and SCL lines, the SCL and SCL frequency depend upon the micro controller clock frequency and data rate of the I2C depend on the configuring baud rate for the I2C protocol.

If you write the data in to the EEPROM with I2C initially you send the address of the device specified in the data sheet and then send the address of the internal location of the EEPROM device where you store the data.

The EEPROM internal address locations are two byte address locations staring from 0000-up to their memory size, then write the data into that memory.

EEPROM is the eraisable memory that's why when you write the data into same location again and again previous data erased and new data written into that location.

Thanks & Regards,
Chandu.Kurapati.
 

You'll find both, required I2C bit level and memory read/write timing in memory device data sheets. Or review the general I2C specification form NXP.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top