The banksel STATUS should be before movwf TEMP. I coded another dummy read as last as a workaround. Make sure your TEMP variable is NOT allocated below 20H.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After some more work, I moved the EPReads in my program, and they are ok. I believe the above time, they were at the end of program or near it after compile. So, probably not worth looking at unless someone else has the same problem.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That bug was caused by some dodgy bank selection code that I've now rewritten. Please download the latest update ( http://gcbasic.sourceforge.net/update.html ) and see if it helps.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Tried the latest update. The EPReads and writes are fine (although since the move they worked before). I don't have the exact source code that had trouble above to test.
The update reduced a few bankselects that were unneeded in the main program. Great. Added one in the interrupt context restore that wasn't needed. Ok.
The interrupt handler still has the clrf STATUS missing that is needed (for the PIC12 as least, not sure of others). Latest version of GCBasic with the clrf STATUS manual edit is stable for my application with two interrupt routines, EEProm reads and writes, etc.
Thanks for the support!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have multiple EEPROM reads in a row. The last read statement has a bank select wrong. The ones before are correct. Here's the last one:
call SYSEPREAD
banksel EEDATAVALUE
movf EEDATAVALUE,W
movwf TEMP
banksel STATUS
return
The banksel STATUS should be before movwf TEMP. I coded another dummy read as last as a workaround. Make sure your TEMP variable is NOT allocated below 20H.
After some more work, I moved the EPReads in my program, and they are ok. I believe the above time, they were at the end of program or near it after compile. So, probably not worth looking at unless someone else has the same problem.
That bug was caused by some dodgy bank selection code that I've now rewritten. Please download the latest update ( http://gcbasic.sourceforge.net/update.html ) and see if it helps.
Tried the latest update. The EPReads and writes are fine (although since the move they worked before). I don't have the exact source code that had trouble above to test.
The update reduced a few bankselects that were unneeded in the main program. Great. Added one in the interrupt context restore that wasn't needed. Ok.
The interrupt handler still has the clrf STATUS missing that is needed (for the PIC12 as least, not sure of others). Latest version of GCBasic with the clrf STATUS manual edit is stable for my application with two interrupt routines, EEProm reads and writes, etc.
Thanks for the support!