Hi all, I am using pic24FJ256GB110 and RD9 pin doean't want to function as input. I= tested the same pin works as output. normally when other modules are available on same pin needs to be disabled. in my ca= se DPLN external USB OTG transceiver needs to be disabled. what I did is the fallowing: remap RD9 =A0to UART 4 and I am using macro to do the job: I know this macr= o works because I have 3 more uarts working // Remap UART4 to Ra232 RX =A0 =A0 =A0 =A0 iPPSInput(IN_FN_PPS_U4RX,IN_PIN_PPS_RP4);// U4RX to pin =A0= RD9 RP4 =A0"RS232 RX" =A0=A0 =A0 // rs232 =A0 =A0 =A0 =A0 TRISDbits.TRISD9 =3D 1; =A0 // D9 input =A0RS232 RX RP4/ CN =A0 =A0 =A0 =A0 CNPU4bits.CN54PUE =3D 1; =A0// enable pullup // Disable DMLN and DPLN =A0Pull up / pull down resistors =A0U1OTGCONbits.DMPULDWN =3D 0; =A0U1OTGCONbits.DMPULUP =3D 0; =A0U1OTGCONbits.DPPULUP =3D 0; =A0 =A0 =A0 =A0 U1OTGCONbits.DMPULDWN =3D 0; =A0 =A0 =A0 =A0 U1OTGCONbits.OTGEN =3D 0; =A0 =A0 =A0 =A0 U1PWRCbits.USBPWR =3D 0; =A0 // disable USB just to test =A0 =A0 =A0 =A0 U1CNFG2bits.UTRDIS =3D 0; =A0 =A0 =A0 =A0 U1CONbits.USBEN =3D 0; just a while ago I turned off everything and I am only checking input pin s= till it didn't work.=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 while(1) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 { =A0 =A0 if(PORTDbits.RD9=A0=3D=3D0) =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0{ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 RLED_ON; =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 } now I know for sure: 1. the hardware is good I tested as output it can toggle 2. the only suspect goes to is=A0DPLN=A0and I am not 100% sure I turned off I just added : LATDbits.LATD9 =3D 1; I see pull up got enabled but it still doesn't work.=A0 any idea? thanks Andre --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .