upgraded to MPASM 5.39, no change.
I'll try reloading all the software when I get a chance.
upgraded to MPASM 5.39, no change.
I'll try reloading all the software when I get a chance.
I found the problem.
I am using assembly interrupts that reserve a location in each bank for the wsave register. This effectively limits an array size to 255 bytes since the array can't cross this reserved register.
Luckily this processor has a special stack that will store the W, STATUS, and BSR registers automatically and then automatically restore them if a "fast" retfie command is used. This removes the requirement to reserve a memory location in each bank for the wsave register. Using this method works as advertised. This will only work if high priority interrupts are not used, which was the case in my code.
On 18F types you can force your context saving vars to be placed in access ram so there's no need to put them in more than 1 place.
wsave var byte BANKA SYSTEM ' location for WREG
ssave var byte BANKA SYSTEM ' location for STATUS register
bsave var byte BANKA SYSTEM ' location for BSR register
You might want to use DT_INTS, it makes it pretty easy to use interrupts, and doesn't cause the problems you are seeing, whether using asm or pbp type interrupts.
http://darreltaylor.com/DT_INTS-18/home.html
http://www.scalerobotics.com
Bookmarks