Hi Dip,
With the 16F877, you can easily write one word at a time to Flash. When the 16F877A came along, you had to write 4 words at a time. And now with the 18F's, you have to write 8 bytes (still 4 words). And some of the newer ones require 16 bytes.
Also with the 877, the chip automatically erases the location being written to. The 18F's have to be erased first, or be writing to locations that were previously erased, or left blank after programming. When erasing 18F's, it erases a block of 64 bytes at a time.
So, if you want to write to Flash at $200, you have to write from $200 to $207.
If instead you wanted to write to $19C, you'd have to write from $198 to $19F.
It actually places the data in "Holding Registers" untill the last byte is recieved. Then it does the write to flash. So unless it gets a byte for the eighth location, it never actually does the write.
<br>
Bookmarks