2011-12-26, 13:19:11
Hi,
I am sorry about the delay. Unfortunately I don't have any PIC16F8xx to try on.
Do you use any code or write protection?
Which voltage do you run on?
Does it work if you remove write verification?
Replace
With
I am sorry about the delay. Unfortunately I don't have any PIC16F8xx to try on.
Do you use any code or write protection?
Which voltage do you run on?
Does it work if you remove write verification?
Replace
Code:
;----------------------------------------------------------------------
; Write complete, verify row
;----------------------------------------------------------------------
verword
decf EEADRL_ ;bank 2/3
; Read word
banksel EECON1_
ifdef HAS_EE
bsf EECON1_, EEPGD ;bank 3
endif
bsf EECON1_, RD ;bank 3
nop
nop
; Compare high byte
decf FSR_
movfw INDF_
andlw 0x3F ;maybe we should only compare low 6 bits?
banksel EEDATH_
subwf EEDATH_ ;bank 2/3
btfss STATUS, Z
goto verfail
; Compare low byte
decf FSR_
movfw INDF_
subwf EEDATL_ ;bank 2/3
btfss STATUS, Z
goto verfail
; Loop?
decfsz rowcnt2
goto verword
; Verify succesfull
goto Main
Code:
;----------------------------------------------------------------------
; Write complete, verify row
;----------------------------------------------------------------------
verword
goto Main