Re: problems with I2c
- From: Patrick van Gelder <palta42@xxxxxxxxxxx>
- Date: Mon, 27 Nov 2006 15:56:51 +0100
On 25 Nov 2006 12:21:23 -0800, ddshore@xxxxxxxxx wrote:
Hi,<snip>
I'm having some problems using i2c to write to an eeprom, a 24lc515.
Sometimes it'll write to it without any problems, and sometimes it
won't write at all.
The code I am using is this:
void EE_wr_byte(int EE_address, char data)
{
It is probably a delay issue. Writing 1 bytes takes like 10 msec
I really don't understand what I'm doing wrong. At first I thought it
was a delay issue, so I added some delays between the write and read
cycles, however this does not change anything.
Any help would be appreciated
because it has to do some erasing internally. Writing multiple bytes
in the same page also takes 10 msec.
Read the part about aknowledge polling in the data***.
If you want to verify this is your problem, add like 10 or 20 msec of
delay after writing 1 byte.
Patrick
.
- References:
- problems with I2c
- From: ddshore
- problems with I2c
- Prev by Date: Re: Which arm7 dev board to buy?
- Next by Date: Re: which object orient language is most suitable for embedded programming?
- Previous by thread: problems with I2c
- Next by thread: Re: problems with I2c
- Index(es):