AtomSoft
Well-Known Member
Hey everyone, im trying to use RC4/5 as GPI (general purpose inputs) and can not seem to get them to read correctly...
My code for init is:
Am i missing something? There is no TRIS for these pins as they are Input only... thoughts?
My code for init is:
Code:
ADCON0 = 0;
ADCON1 = 0x0F;
CM1CON = 0x00;
ANCON0 = 0xFF;
ANCON1 = 0x0F;
CM2CON = 0x00;
CCP1CON = 0;
INTCON = INTCON2 = INTCON3 = 0;
PIR1 = PIR2 = 0;
PIE1 = PIE2 = 0;
//DISABLE USB
UCON = 0;
UCFG = 0;
...
if(PORTCbits.RC4 == 1)
ToTerminal("CH0/RC4 is HIGH.\r\n\0");
else
ToTerminal("CH0/RC4 is LOW.\r\n\0");
Am i missing something? There is no TRIS for these pins as they are Input only... thoughts?