|
Nada postawit break point sled polling loop(
Disable interrupts (if enabled).
7. Execute the special five instruction sequence:
• Write 55h to EECON2 in two steps (first to W, then to EECON2)
• Write AAh to EECON2 in two steps (first to W, then to EECON2)
• Set the WR bit
8. Enable interrupts (if using interrupts).
).
I dumau sto wso budet OK.
bsf STATUS,RP1
bsf STATUS,RP0
bcf EECON1, EEPGD
bsf EECON1,WREN
bcf INTCON, GIE
movlw 0x55
movwf EECON2
movlw 0xAA
movwf EECON2
bsf EECON1,WR ; - При отладке с ICD- ; не устанавливается
NotDone
btfsc EECON1,WR;Ожидание конца записи
goto NotDone
nop ; break point when write compleated
bcf EECON1,EEIF
bcf EECON1,WREN
bcf STATUS,RP0
bcf STATUS,RP1
return
E-mail: info@telesys.ru