Also, will any previous value at the same address be overwrited?
As long as you increment/decrement your address by 2 you shouldn't overwrite any previous/next data.
Writing to the same adress ( let's say $06) will overwrite the previous value wich was @ $06 and $07
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi, Simon
I had the same problem with EEprom 16 bits storing ...
a simple way is to trucate values into Value.lowbyte and value.highbyte
for addressing, i.e use addresses for Highbytes as 2*n and for lowbytes as 2*n + 1 ...
and when reading you do the same.
there's no mix that way - just takes 2 I2CWRITE lines instead of 1 !!!
as address is defined as a Word ... the count for me is 65536 locations at max ...so, it could explain overwriting some values !!! for 256k you will probably have to add some extra block addressing.
in French .... would be easier !!! let's say this accelometer makes me think to something in the air ....
Alain
************************************************** ***********************
Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
************************************************** ***********************
IF there is the word "Problem" in your question ...
certainly the answer is " RTFM " or " RTFDataSheet " !!!
*****************************************
I resolved some problem in my code, but something trouble me about the FOR...Next loop. My code is :
For address = 0 to last STEP 4
I2CREAD SDA,SCL,cbit,address,[xsend.Highbyte]
address = address + 1
I2CREAD SDA,SCL,cbit,address,[xsend.Lowbyte]
...
Next
My value in my EEPROM are like this (numbers are EEPROM locations) :
01 23 45 67 89
|xx|yy|xx|yy|xx|...
Normally, the output value of address should be : 0,4,8,12,16,...
But will the '' address = address + 1 '' line affect this output, giving result like this : 0,5,10,15,20,... ????????
This should be an easy question for you
well yes no toaster hamburger. What about the whole variable definition or code?
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Here's my whole code... but it may be difficult to follow.
Check the subroutine LOAD, it is the problem I verified the writing with another program.
Bookmarks