So do you want to keep the error a secret?
C Thread Starter Claudinho Joined Nov 1, 2015 10 Nov 2, 2015 #22 PANEL_ANSEL_ANS_BIT = 1; BATTERY_ANSEL_ANS_BIT = 1; Are these two lines of code that you gave me that are causing error in the compilation.
PANEL_ANSEL_ANS_BIT = 1; BATTERY_ANSEL_ANS_BIT = 1; Are these two lines of code that you gave me that are causing error in the compilation.
spinnaker Joined Oct 29, 2009 7,830 Nov 2, 2015 #23 If you are using XC8, you could also use the XC8 ADC functions found in the PIC18 Peripheral LibraryHelp Document
If you are using XC8, you could also use the XC8 ADC functions found in the PIC18 Peripheral LibraryHelp Document
spinnaker Joined Oct 29, 2009 7,830 Nov 2, 2015 #24 Claudinho said: PANEL_ANSEL_ANS_BIT = 1; BATTERY_ANSEL_ANS_BIT = 1; Are these two lines of code that you gave me that are causing error in the compilation. Click to expand... Did you define them? And are they configured to your hardware? #define PANEL_TRIS TRISCbits.TRISC0 #define PANEL_ANSEL_ANS_BIT ANSELbits.ANS4 I just posted some example code. You are going to have to do some work in configuring it to work with your chip.
Claudinho said: PANEL_ANSEL_ANS_BIT = 1; BATTERY_ANSEL_ANS_BIT = 1; Are these two lines of code that you gave me that are causing error in the compilation. Click to expand... Did you define them? And are they configured to your hardware? #define PANEL_TRIS TRISCbits.TRISC0 #define PANEL_ANSEL_ANS_BIT ANSELbits.ANS4 I just posted some example code. You are going to have to do some work in configuring it to work with your chip.