BSF ADCON1, PCFG3; 1111 Make all AD inputs digital
BSF ADCON1, PCFG2
BSF ADCON1, PCFG1
BSF ADCON1, PCFG0
'
Dir RecA IN
Dir RecB IN
BTFSC RecA; this gave Error Symbol 3968.0 NOT defined.
BTFSC RecB; This worked
BTFSC RecC; this gave Error Symbol 3969.0 NOT defined.
BTFSC RecD; This worked
BTFSC RecE; this gave Error Symbol 3970.0 NOT defined.
BTFSC RecF; This worked
BTFSC RecG; this gave Error Symbol 3971.0 NOT defined.
BTFSC RecH; This worked
If I changed the zero in any or all of the #define RecX PORTx.0 statements to
any other number it worked with out errors.
For example, using #define RecE PORTC.0 and this statement
BTFSC RecE; gave "Error Symbol 3970.0 NOT defined."
Changing to RecE PORTC.3 solved the error.
Why is this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wrote the following code and got the errors shown below:
;Chip Settings
#chip 18F4550,48
#config PLLDIV=5, CPUDIV=OSC1_PLL2, OSC=HSPLL_HS, MCLRE=ON, LVP=OFF
BCF ADCON0, ADON; Disable AD converter
BSF ADCON1, PCFG3; 1111 Make all AD inputs digital
BSF ADCON1, PCFG2
BSF ADCON1, PCFG1
BSF ADCON1, PCFG0
'
Dir RecA IN
Dir RecB IN
BTFSC RecA; this gave Error Symbol 3968.0 NOT defined.
BTFSC RecB; This worked
BTFSC RecC; this gave Error Symbol 3969.0 NOT defined.
BTFSC RecD; This worked
BTFSC RecE; this gave Error Symbol 3970.0 NOT defined.
BTFSC RecF; This worked
BTFSC RecG; this gave Error Symbol 3971.0 NOT defined.
BTFSC RecH; This worked
If I changed the zero in any or all of the #define RecX PORTx.0 statements to
any other number it worked with out errors.
For example, using #define RecE PORTC.0 and this statement
BTFSC RecE; gave "Error Symbol 3970.0 NOT defined."
Changing to RecE PORTC.3 solved the error.
Why is this?