Rio Posted June 21, 2007 Report Share Posted June 21, 2007 1. Are there some things that i've to mention if i want to implement an bankstick support (readpage/writepage) for 32k and 64k type. What is the difference for programming? I've only a 32k EEPROM for testing...2. Is the read and save code for 32K usable for 64k EEPROMs too?3. Are they formated automatically by MIOS if they are never used before and then connected?4. How can i format them in C? Quote Link to comment Share on other sites More sharing options...
TK. Posted June 21, 2007 Report Share Posted June 21, 2007 Yes, you can use the same functions for a 64k EEPROM, and no - MIOS doesn't format a BankStick, this has to be done by your application. Just define a "magic number" (e.g. 0x47, 0x11 written to 0x0000 and 0x0001), and check for this value. If you get a different value, you know that your BankStick hasn't been formatted yet. Initialize it with some useful values, write 0x47 0x11 to the specific address - doneBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Rio Posted June 22, 2007 Author Report Share Posted June 22, 2007 So the difference between the 32K und 64K is the available address range: $7FFF and $FFFF.If understand it right: best should be to proof 2 specific values in $0000 and $0001 and if them are wrong the whole range should be initilise maybe with $00 and then the specific values should be written to $0000 and $0001 again.But why i have to proof 2 values... because one could be randomly the same before on that adress?Best Greets, Rio. Quote Link to comment Share on other sites More sharing options...
TK. Posted June 22, 2007 Report Share Posted June 22, 2007 The probability that a 8bit value already exists in an unformated EEPROM is lower than for 16bit.Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.