Quote Originally Posted by MR2010 View Post
hi art im newbe but if im right i noticed an error in your code .sorry if its not.
Code:
W0 var byte
epin var word   <<<<<  i think this is address ?

W0 = 0
FOR cntr = 0 TO 2000  	'should be( FOR epin= 0  TO 2000 )!	or (cntr)should be var  xxx
epin = epin + 5		'
I2CWRITE porte.1,porte.2,%10100000,epin,[W0,W0,W0,W0,W0],error	
pause 10						'
						'
NEXT cntr
hope this helps
see Gusse code moght it helps
Yes epin is an address word but it is incremented by the line:
epin = epin + 5 in the code I provided.
This is correct because the I2CWRITE command has written five addresses sequentially.
The cntr var should be declared at the top, I forgot that.

Art, I have used external eeproms on most all of my projects and have never had any problems with bad data.
Hi Dave,
Solar electricity rules, and if you use it to run a fridge it slaps nature in the face
I'll try a paralel resistor value to equal 2.2K, and retry the DEFINE I2C_SLOW 1.
Normally I don't have problems with EEPROMS either.

One other thing.
I have introduced five new byte vars, and done a readback of the five
written bytes so the program can verify what was read from the EEPROM is
the same as what was written 10ms ago.
If the results don't match, it goes back to rewrite the original (correct) values.

When it gets to one of the addresses in question, it just hangs there
rewriting all the time, and never getting the data right.