I'm using a PIC16F1933 for some simple switch detection stuff.
I have a #define statement to map the PIC pins to a text name used within the assembly program.
I'd like to be able to change that definition within the program.
eg. the name SW_1 detects an input from PORTA,0 normally, but if some other condition is met, I'd like SW_1 to detect an input from PORTB,1 and still use the name SW_1
The goal is to reference the NAME within the body of the program while changing SOURCE depending on other conditions.
Is this (easily) possible? ... how?
Thanks
I have a #define statement to map the PIC pins to a text name used within the assembly program.
I'd like to be able to change that definition within the program.
eg. the name SW_1 detects an input from PORTA,0 normally, but if some other condition is met, I'd like SW_1 to detect an input from PORTB,1 and still use the name SW_1
The goal is to reference the NAME within the body of the program while changing SOURCE depending on other conditions.
Is this (easily) possible? ... how?
Thanks