Hey,
I'm trying to write to EEPROM.. After I get that Ill try read..
The data isnt written to the EEPROM and instead of continueing on with the program, it sits there(I believe anyway).
I was thinking the problem might have to do with "AAh". When I write "AAh" in MPLAB, it shows up in purple like its a symbol, not blue, like the 55h does. I have to write AAh in my cblock which I think is just substituing any old register for the AAh register.
Thanks
I'm trying to write to EEPROM.. After I get that Ill try read..
Code:
movlw 0h
movwf EEADR
movlw 0x0F
movwf EEDATA
bsf STATUS,RP0 ;bank 1
bsf EECON1,WREN ;enable write
bcf INTCON,GIE ;disable interrupts
movlw 55h ;unlock write
movwf EECON2
movlw AAh
movwf EECON2
bsf EECON1,WR ;start the write
bsf INTCON,GIE ;enables interrupts
The data isnt written to the EEPROM and instead of continueing on with the program, it sits there(I believe anyway).
I was thinking the problem might have to do with "AAh". When I write "AAh" in MPLAB, it shows up in purple like its a symbol, not blue, like the 55h does. I have to write AAh in my cblock which I think is just substituing any old register for the AAh register.
Thanks