I've had to adapt an asm code done in PIC18F to one done in PIC16F, theorically it shouldn't be anything more than putting the needed banksel references, but in practice I'm finding a strange problem:
This piece of code:
Works right on PIC18F, so when my button is pressed, and has been stopped being pressed before P0, I can execute "more instructions" but in PIC16F I can't get to them and when I press the button nothing happens, despite the high level going to RA4, moreover, something "funny" occurs, if I put a terminal of a wire in contact with RA4 without it being connected nowhere is starts executing the instructions until I put the terminal away from RA4, I don't know for what reason.
Any idea of what to do to make it work on PIC16F?
This piece of code:
Code:
P1 BTFSC PORTA,4
GOTO P1
P0 BTFSS PORTA,4
GOTO P0
"More instructions"
GOTO P1
Works right on PIC18F, so when my button is pressed, and has been stopped being pressed before P0, I can execute "more instructions" but in PIC16F I can't get to them and when I press the button nothing happens, despite the high level going to RA4, moreover, something "funny" occurs, if I put a terminal of a wire in contact with RA4 without it being connected nowhere is starts executing the instructions until I put the terminal away from RA4, I don't know for what reason.
Any idea of what to do to make it work on PIC16F?
Last edited: