Hi again,
I feel this is might be a stupid question !
It's enough (too easy) Pause 90 instead of Pause 10 ?
Otherwise how can i make a 10ms pause after each byte ?
Thanks again
Hi again,
I feel this is might be a stupid question !
It's enough (too easy) Pause 90 instead of Pause 10 ?
Otherwise how can i make a 10ms pause after each byte ?
Thanks again
A 90ms Wait ist not right.
I think, the EEPROM can access its memory in pages of 32 Bytes.
So, if you write inside this page, it can be written back in one event just needing 10ms pause.
But if you are crossing this pages, you must adress the new page with a new I2C-Command.
Just read the dokumentation and see, if if is possible for you to use pages. Maybe it will be ok, if you drop every 5 Bytes at the end of a page ?
PBP 2.50C, MCS+ 3.0.0.5, MPLAB 8, MPASM 5.14, ASIX Presto, PoScope, mE mikroBasic V7.2, PICKIT2
SerIn2 RX, BAUD, [wait("XY"),STR long\9]
Pause 2000
For CounterA=0 to 8
Address=ADD+CounterA
I2CWrite SDA,SCL,EEP,Address,[STR(CounterA)]
Pause 10
Next CounterA
@ BigWumpus
Yes you are right. I saw (datasheet) that Page Write mode allows up to 32
bytes per writing cycle.
Now let's see how to 'cheat' the 24c64 !
@ Melanie
Thanks for the code.
Unfortunatly I receive a compiling error on line:
I2CWrite SDA,SCL,EEP,Address,[STR(CounterA)] = Bad Expression
I tried some small chances but no success.
I'm sorry I'm not a Pro and I still need your help.
Thanks
Probably needs an intermediate variable because I don't think variable indexed arrays are allowed with I2CREAD or I2WRITE... try this...
CounterA var BYTE
DataA var BYTE
SerIn2 RX, BAUD, [wait("XY"),STR long\9]
Pause 2000
For CounterA=0 to 8
Address=ADD+CounterA
DataA=STR(CounterA)
I2CWrite SDA,SCL,EEP,Address,[DataA]
Pause 10
Next CounterA
Bookmarks