writecode work on 18f26j11?


Closed Thread
Results 1 to 3 of 3
  1. #1
    EE12212's Avatar
    EE12212 Guest

    Question writecode work on 18f26j11?

    hello

    Someone tell me if writecode command works in the pic18F26J11?
    I can read through the readcode all memory locations, but i can't write in memory!
    any idea?

    Code:
    ESCREVER:
    
    FlashAddr = $4e20
    FlashData = MODE
    INTCON.7 = 0
    EECON1.2 = 1
    EECON1.5 = 1
             erasecode flashaddr
    EECON2 = $55
    EECON2 = $AA
    EECON1.1 = 1
             WRITECODE flashaddr, FlashData
    EECON1.1 = 0
    EECON1.2 = 0
    EECON1.5 = 1
    INTCON.7 = 1
    LCDOUT $FE,$D6,#flashdata
        
    RETURN
    
    
    
    '___________________________________________________________________
    leitura:
    
    FlashAddr = $4e20
    READCODE FlashADDR, flashdata
    LCDOUT $FE,$D0,#flashdata
    MODE = FLASHDATA
    
    return

  2. #2
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default Re: writecode work on 18f26j11?

    The "Word Programming" mode is not supported.
    You would need to write 64 bytes at a time with WRITECODE.

    ERASECODE will erase 1024 bytes.

    If you use the assembly language code from the datasheet, you can write 1 word at a time.
    But you can still only erase blocks of 1024 bytes.
    DT

  3. #3
    EE12212's Avatar
    EE12212 Guest


    Did you find this post helpful? Yes | No

    Default Re: writecode work on 18f26j11?

    thanks for the information Darrel.
    on monday i will try the both ideas (assembly and 64bytes at a time).

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts