fiveten
Member
Hello all,
I am having a problem changing eeprom addresses.
I am using a variable "ADR"
movlw 0x00
movwf ADR
call EE_Read
incf ADR
call EE_Read
EE_Read
bsf STATUS, RP0 ; Bank 1
movlw ADR
movwf EEADR ; Address to read
bsf EECON1, RD ; EE Read
movf EEDATA, W ; W = EEDATA
bcf STATUS, RP0 ; Bank 0
return
as i step through this code and i get to "movlw ADR" the w reg does not take this value.
am I addressing incorrectly? do i have to put a hex address in place of the ADR?
Please advise, Thanks
I am having a problem changing eeprom addresses.
I am using a variable "ADR"
movlw 0x00
movwf ADR
call EE_Read
incf ADR
call EE_Read
EE_Read
bsf STATUS, RP0 ; Bank 1
movlw ADR
movwf EEADR ; Address to read
bsf EECON1, RD ; EE Read
movf EEDATA, W ; W = EEDATA
bcf STATUS, RP0 ; Bank 0
return
as i step through this code and i get to "movlw ADR" the w reg does not take this value.
am I addressing incorrectly? do i have to put a hex address in place of the ADR?
Please advise, Thanks