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