Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with ds30BootLoader and 16F887 [solved]
#9
(2011-12-26, 13:19:11)Mikael Gustafsson Wrote: 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
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
With
Code:
        ;----------------------------------------------------------------------
        ; Write complete, verify row
        ;----------------------------------------------------------------------    
verword
                goto     Main

Hi Mikael,
Thank You very much for your support!...
I tried your source code but unfortunately Pic don' t write flash.
Now the error message does not appear but Flash is not written. I don' t use any protection.
I use 5Vdc Power Source for my Pic circuit with an "LM7805".
I use as RS232 Circuit, a Max_232 similar the scheme in your manual "AN1310" (but with 5 Vdc).
If I program Pic with an Usart.hex for testing it, it' s all ok, therefore this circuit work well. I use an RS232 Pin to Pin cable and it's all ok.
When I test your firmware, your program found the BootLoader with correct version therefore cable, Max232 Circuit, and your firmware works!
I try with another Pic_16F887 but no changes...
I hope in your news.
Best Regards.
Reply


Messages In This Thread
RE: Problem with ds30BootLoader and 16F887 - by dasty80 - 2011-12-28, 16:03:34

Forum Jump:


Users browsing this thread: 1 Guest(s)