EEprom writing

E

Enzo

Guest
I use the I2C bus for writing/reding eeprom 24Cxx, with 8051 Micro family.

When i write to it, i have to wait a lot of time, otherwise nothing is
written.

It seems i follow the correct signals sequence, but i cannot get out of this
delay.

Is there someone that has experience ?

Enzo
 
Enzo wrote:
I use the I2C bus for writing/reding eeprom 24Cxx, with 8051 Micro family.

When i write to it, i have to wait a lot of time, otherwise nothing is
written.

It seems i follow the correct signals sequence, but i cannot get out of this
delay.

Is there someone that has experience ?
Well, writing an EEPROM takes a few ms per adress.
You could do something else in the remaining time.
Do you poll for a flag or is there an interrupt ?

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
 
On Thu, 07 Apr 2005 12:04:08 GMT, the renowned "Enzo"
<ternavasio@enzoternavasio.it> wrote:

I use the I2C bus for writing/reding eeprom 24Cxx, with 8051 Micro family.

When i write to it, i have to wait a lot of time, otherwise nothing is
written.

It seems i follow the correct signals sequence, but i cannot get out of this
delay.

Is there someone that has experience ?

Enzo
It's the nature of the beast. If you can't stand the delay (perhaps
because you have other devices on the shared I2C bus(, either
implement a second I2C bus (or other dedicated bus such as SPI or
Microwire for the EEPROM) or use a nonvolatile technology with less
inherent write time, such as ferroelectric RAM or battery-backed SRAM.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
Ramtron has FRAM which has "no delay writes" (actuall 72nS I think).

The have are mostly drop in I2c compatable with 24cxx eerpoms... part no
FM24Cxx.

www.ramtron.com

JG
"Enzo" <ternavasio@enzoternavasio.it> wrote in message
news:Yk95e.747173$b5.33580119@news3.tin.it...
I use the I2C bus for writing/reding eeprom 24Cxx, with 8051 Micro family.

When i write to it, i have to wait a lot of time, otherwise nothing is
written.

It seems i follow the correct signals sequence, but i cannot get out of
this
delay.

Is there someone that has experience ?

Enzo
 
Enzo wrote:

I use the I2C bus for writing/reding eeprom 24Cxx, with 8051 Micro family.
So do I. :)

When i write to it, i have to wait a lot of time, otherwise nothing is
written.
Please define 'a lot of time'.


It seems i follow the correct signals sequence, but i cannot get out of this
delay.
Did you code your own routine to handle the I2C bus or use a library routine
such as supplied with a compiler ? Are you using an 8051 derivative with a
dedicated I2C controller or simply using general port pins ?

Are you using a high level alnguage - if so - which one ? Do your Eeprom writes
and reads work OK ?

Is there someone that has experience ?
Well, Eeproms aren't hugely fast ! Maybe you're expecting too much ?

How many bytes of data are you typically writing at a time ?

Graham
 
"Joe.G" wrote:

Ramtron has FRAM which has "no delay writes" (actuall 72nS I think).

The have are mostly drop in I2c compatable with 24cxx eerpoms... part no
FM24Cxx.

www.ramtron.com
What's the data rate on the serial data line to achieve that ? ;-)

That's the blink of an eye to an 8051.


Graham
 
I'm using general purpose pins of 8051, for SDA and SCL signals.
The problem comes from the ACK from the eeprom, that sometimes takes a lot
of time to arrive.
The SDA pin gooes low after a lot of time (0.5 sec !!!).

The software is in c (IIAR compiler)

I'm doing something wrong.

Enzo
 
On Fri, 08 Apr 2005 11:47:53 GMT, the renowned "Enzo"
<ternavasio@enzoternavasio.it> wrote:

I'm using general purpose pins of 8051, for SDA and SCL signals.
The problem comes from the ACK from the eeprom, that sometimes takes a lot
of time to arrive.
The SDA pin gooes low after a lot of time (0.5 sec !!!).
That's a crazy length of time. Sounds more like a WDT timeout while
waiting for a ACK that never comes. Don't quote me on this, but IIRC,
you have to poll the device to get it to ACK after a write.

The software is in c (IIAR compiler)

I'm doing something wrong.
Enzo
Yes. I've seen enough errors in this kind of routine, even from
manufacturers, that I carefully analyze it before using it. Saves a
lot of time and understanding the code is never a bad thing.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@interlog.com Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
 
That's a crazy length of time. Sounds more like a WDT timeout while
waiting for a ACK that never comes. Don't quote me on this, but IIRC,
you have to poll the device to get it to ACK after a write.
Bingo! I think you start to do another write and see if you get ACK -
this means its done with the last one. If not, then do another...

--
Luhan Monat (luhanis 'at' yahoo 'dot' com)
"The future is not what it used to be..."
http://members.cox.net/berniekm
 
"Joe.G" <joe.g@optusnet.com.au> wrote:

Ramtron has FRAM which has "no delay writes" (actuall 72nS I think).

The have are mostly drop in I2c compatable with 24cxx eerpoms... part no
FM24Cxx.
Thanks for mentioning! I was looking for serial SPI compatible RAM for
some time.

--
Reply to nico@nctdevpuntnl (punt=.)
Bedrijven en winkels vindt U op www.adresboekje.nl
 
"Joe.G" <joe.g@optusnet.com.au> wrote in message
news:4255422c$0$12159$afc38c87@news.optusnet.com.au...
Ramtron has FRAM which has "no delay writes" (actuall 72nS I think).

The have are mostly drop in I2c compatable with 24cxx eerpoms... part
no
FM24Cxx.

www.ramtron.com

JG
"Enzo" <ternavasio@enzoternavasio.it> wrote in message
news:Yk95e.747173$b5.33580119@news3.tin.it...
I use the I2C bus for writing/reding eeprom 24Cxx, with 8051 Micro
family.

When i write to it, i have to wait a lot of time, otherwise nothing is
written.

It seems i follow the correct signals sequence, but i cannot get out of
this
delay.

Is there someone that has experience ?

Enzo
Also, the delay is the same to write one byte, as to write a 'block'. Most
of the chips support 16 byte or more 'block write' mode, so you can save a
lot of time if moving big amounts of data, by using the block write
feature.
You can also verify whether the write has finished by doing a 'start',
sending a command, and checking for ack. This allows the delay to reduce
in some cirumstances (the write time changes with temperature, voltage
etc.).
The FRAMs are great though. I have used these for a couple of years on
various projects, and they are a godsend where you don't want the delays.

Best Wishes
 

Welcome to EDABoard.com

Sponsor

Back
Top