I know its an old PIC, I know there are better ones out there but its what I have. I have been searching the Microchips documentations, the PIClist files and all over the internet for this issue but have found no answer so I ask it here.
My program uses indirect addressing to access different tables (YES, its another damned LED program but we all have to start somewhere) The trouble is that although the FSR shows the correct addresses when stepping through the application the W register never loads with the data stored at that address. My understanding of the INDF implimentation is that I store an address in FSR and reading INDF will give me the data stored at the address pointed to by FSR. This is not happening.
** code snippit **
Loop1 movf Count,w ; Put current count into W
addwf CurPatt,w ; Update current position in sequence
movwf FSR ; Store this Indirect register
movf INDF,w
movwf PORTB
** end **
I am using MPLAB IDE and stepping through the program using MPLAB SIM
All examples I have found show this as proper but still it fails to work. Does the 16F84a INDF not function correctly? Even the old 6809e processor could do indirect addressing so what am I doing wrong?
My program uses indirect addressing to access different tables (YES, its another damned LED program but we all have to start somewhere) The trouble is that although the FSR shows the correct addresses when stepping through the application the W register never loads with the data stored at that address. My understanding of the INDF implimentation is that I store an address in FSR and reading INDF will give me the data stored at the address pointed to by FSR. This is not happening.
** code snippit **
Loop1 movf Count,w ; Put current count into W
addwf CurPatt,w ; Update current position in sequence
movwf FSR ; Store this Indirect register
movf INDF,w
movwf PORTB
** end **
I am using MPLAB IDE and stepping through the program using MPLAB SIM
All examples I have found show this as proper but still it fails to work. Does the 16F84a INDF not function correctly? Even the old 6809e processor could do indirect addressing so what am I doing wrong?