Jump to content

Bankstick support


Rio
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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 - done

Best Regards, Thorsten.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...