Hi guys, this is my first post ever.
I have been spending some time trying to figure out why i can't read the input from RC15 on the PIC32MX120F064H microcontroller.
I have already disabled the Oscillator output with:
#pragma config FNOSC = FRCPLL //Clock source FRCPLL > Internal
#pragma config IESO = ON, POSCMOD = HS, FSOSCEN = OFF //48 Mhz configuration
#pragma config FPLLMUL = MUL_24, FPLLIDIV = DIV_1, FPLLODIV = DIV_4
//Peripheral Bus Clock Divisor Default Value bits (1,2,4,8)
#pragma config FPBDIV = DIV_2 //PBCLK is SYSCLK divided by the number selected
#pragma config OSCIOFNC = OFF // clock out disabled!!!!!
Set the tris to the correct value in both ways (Both work):
TRISCbits.TRISC15 = 1;
//mPORTCSetPinsDigitalIn(BIT_17);
and finally read the port
if(PORTCbits.RC15)
Although the pin input is high (> 2.
the value isn't updated.
I'm using MPLABX v3.2 with the XC1.4 compiler.
Any idea or suggestion will be highly appreciated.
peperoca116