Hi,
As far as I understand (having played around with the SST25VF08 a couple of years ago) you have to,
A) Make sure the adress you're trying to write to it's erased,
B) If the WP-pin is HIGH, make sure the block you're trying to write is NOT protected by the Block Protect bits in the status register, see below.
B.1) Execute the EWSR command
B.2) Execute the WRSR command
B.2) Write the new value (0 to unlock all of it) of the status register
C) Execute the WREN instruction.
I highly recommend you declare a bunch of constants for the various commands, it's much easier than having to a bunch a magic numbers in the code.
Code:
SST_Cmd_Read CON $03 ' Read byte, adress increment automatically
SST_Cmd_EWSR CON $50 ' Enable status register write
SST_Cmd_WREN CON $06 ' Write Enable
SSPBUF = SST_Cmd_WREN
/Henrik.
Bookmarks