found a error in the read/fast read option, where dummy byte was offseting the read address by 1 in flash_comand routine
- heres the updated area
Code:
if SDC_cmd =>2 and SDC_cmd <=3 or _ ' if commands 2= Page write 3= Sector Erase,
SDC_cmd =>6 and SDC_cmd <=8 then ' or 6=Signature read( 3 dummybytes) 7= read data normalspeed or 8 read data at Highspeed then set given address
SDC_data_out = SDC_address.Byte2 ' set sector Address 0 to 15 for 8mb chip
Gosub Flash_spiw ' Write Byte SDC_data_out.
SDC_data_out = SDC_address.Byte1 ' set page address 0 to 255
Gosub Flash_spiw ' Write Byte SDC_data_out.
SDC_data_out = SDC_address.Byte0 ' set byte address 0 to 255
Gosub Flash_spiw ' Write Byte SDC_data_out.
if SDC_cmd = 8 then ' read High speed mode
SDC_data_out = $FF ' used as dummy byte for read High speed mode
Gosub Flash_spiw ' Write Byte SDC_data_out.
endif
endif
Bookmarks