My short stock of 16F88s arrived by UPS, so I read a few straight out of the tube. All flash locations were $0000, and those PICs of course failed the blank check. Then I erased one and read it back in hex. All flash locations are initialized to $3FFF to be "blank", so that's settled.
$FFFF is a 16-bit value, so you must have assumed a 16-bit word. Since the words in flash are only 14 bits, the math says $3FFF is the largest value possible. The data sheet (3.7) makes clear that the contents of 4 successive buffer registers are written, and that after a "long write", the buffers are reset to $3FFF. As long as neither WRITECODE nor anything else meddles with what's in those buffers, there should be no problem.2 - I assume nothing, therefore they should read back as $FFFF
Do you know this, or are you guessing? I don't see how ORing bits is relevant to the question, but I'm anxious to be informed.3 - mandatory I would think. Otherwise you'd just be OR'ing bits...
Okay, you've lost me on this one. Please explain: How does disregarding the 2 least significant bits of the address relate to the value stored at that address?4 - Probably by ignoring the lowest significant 2 bits in the address
Yes, but what actually happens? Does anyone know from experience, accidental or otherwise?5. #3
Well, the data sheet seems to disagree. According to it: A read returns 1 word from flash; a write must be done as a block of 4 words; and an erase must be done as a block of 32 words.A, B, C - I'm fairly sure you have to do everything in the 4 byte blocks, read, erase, write back...
So my questions A and B remain unanswered, but it appears we can be confident that the answer to question C is, "Yes. The value to look for is $3FFF."
Presumably, one "master" erase of many 32-word blocks would be sufficient for a large number of successive writes.
Bookmarks