I cant make much sense of the macros, but i'll just see what happens.
Still waiting for the EEPROM chip to be delivered, but figured I can make a start on my code anyway.
I cant make much sense of the macros, but i'll just see what happens.
Still waiting for the EEPROM chip to be delivered, but figured I can make a start on my code anyway.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Last edited by skimask; - 12th March 2008 at 16:07.
I've been reading the posts about it, and getting a pretty good idea of where to look if it doesn't work first time. I've written a test program just to write 32 bytes to the EEPROM and then read it back and check against the original data. Now just gotta wait for the chip to arrive.
One thing I did notice is that people are saying you have to wait 10mS between writing and reading. Does this also apply to just reading? i.e. If I read 32 bytes with [STR string\32] and then do the same thing again to read the next 32 bytes, will I have to wait 10mS between? I'm sure this info must be in the data sheet, but i looked thru the data but couldnt work it out.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Only applies to the write. If you're using PBP 2.50a, also use the DEFINE that shuts off interrupts during writes.
Use 10mS as a starting point for the 'after write' delay and make sure it all works fine.
Then start backing off your delay until it fails, then bump it up a notch. You could get really picky and use pauseus for the delay.
But I'd say poll the eeprom's busy bit itself for maximum performance.
As far as multiple byte writes, depends on the eeprom. If the eeprom's page size is 32 bytes, then you write 32 bytes, wait 10mS, write 32, wait 10mS...etc...
I'm glad that this only applies to writes, because in this particular application the PIC wont need to write to the EEPROM at all. I will fill it with data 1st, and the PIC will only need to read the data, not write it. So looks like I dont have to worry about timing. I'll just read the data whenever I need it.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
Bookmarks