Peripheral Pin Select

To set or clear the IOLOCK bit, an unlock sequence must be executed: #define PPSUnLock() {SYSKEY=0x0; SYSKEY=0xAA996655; SYSKEY=0x556699AA; CFGCONbits.IOLOCK=0;} #define PPSLock() {SYSKEY=0x0; SYSKEY=0xAA996655; SYSKEY=0x556699AA; CFGCONbits.IOLOCK=1;} Note these defines are likely already included in xc32 UART DISABLE_INT; PPSUnLock() //PPS Unlock (required before setting peripheral pin, if config bit IOL1WAY is set only 1 change of IOLOCK […]

Read More

INT Pins

  Detecting An Int Pin Edge Has Occured //—– SETUP INT 4 PIN —– ConfigINT4(EXT_INT_PRI_1 | FALLING_EDGE_INT | EXT_INT_DISABLE); //Priority, edge trigger, enable. This also clear the irq flat //if (mINT4GetIntFlag()) //{ // mINT4ClearIntFlag(); //Reset the flag //}      

Read More