Charles & Bruce,
Thanks for your help.
Bruce: the code you provided works well and I've tested it in MPLAB with a variety of inputs and it's all OK.
I have 'glued it into PBP and still can't get it to compile. The things I changed between the ASM_only and PBP_ASM are:
1. Deleted the .asm CONFIGS because they come from my programmer.
2. Deleted the .asm variable definitions in data memory, defined them in PBP, watched out for caes sensitivity and changed the .asm definitions to have a leading underscore (e.g. _X_steps).




Bookmarks