Hello,
I'm trying to use AN3 and AN4, but I dont know why the value that the microcontroller (PIC18F4550) is receiving 0-3 (out of 1000)..
Here are the configs I'm using, please help:
#pragma config FOSC = INTOSCIO_EC //internal oscillator
//#pragma config PLLDIV = 1 //divide by 5 to give 4MHz to PLL
//#pragma config FCMEN = OFF //no fail safe clock monitor
//#pragma config IESO = OFF //oscillator switchover disabled
//#pragma config PWRT = ON //oscillator power up timer enabled (release version only)
//#pragma config BOR = OFF //hardware brown out reset
//#pragma config WDT = OFF //watchdog timer disabled
#pragma config MCLRE = OFF //MCLR pin enabled
#pragma config LPT1OSC = ON //timer1 low power operation
#pragma config PBADEN = OFF //portB 0to 4 digital - not analogue
#pragma config LVP = OFF //low voltage programming disabled
#pragma config CCP2MX = ON //portc1 = CCP2
#pragma config XINST = OFF //do not allow PIC18 extended instructions
#pragma config STVREN = ON //stack overflow will cause reset
//#pragma config CP0 = OFF //code protection block 0
//#pragma config CP1 = OFF
//#pragma config CP2 = OFF
//#pragma config CP3 = OFF
//#pragma config CPB = OFF //code protection boot block
//#pragma config CPD = OFF //code protection data EEPROM
/*#pragma config WRT0 = OFF //write protection block 0
#pragma config WRT1 = OFF
#pragma config WRT2 = OFF
#pragma config WRT3 = OFF
#pragma config WRTB = OFF //write protection boot block
#pragma config WRTC = OFF //write protection configuration register
#pragma config WRTD = OFF //write protection data EEPROM
#pragma config EBTR0 = OFF //table read protection block 0
#pragma config EBTR1 = OFF
#pragma config EBTR2 = OFF
#pragma config EBTR3 = OFF
#pragma config EBTRB = OFF //table read protection boot block
*/
Note the comment box too, At first I had these configs too but then to debug, I removed them, but the result is the same..