Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Set Analog pins as digital...
- ADCON1=0X0F;
- ///////////////////////////////
- //Initialize UART2 module with Peripheral Pin Select
- Unlock_IOLOCK();
- PPS_Mapping_NoLock(0, _INPUT, _RX2_DT2);
- PPS_Mapping_NoLock(1, _OUTPUT, _TX2_CK2);
- Lock_IOLOCK();
- delay_ms(100);
- UART_Remappable_Init(9600);
- ////////////////////////////////////////////////////
- //Initialize UART1 module
- delay_ms(100);
- UART1_Init(9600);
- Delay_ms(300);
- /////////////////////////
- //Infinite Loop...
- while (1)
- {
- if (UART_Remappable_Data_Ready()==1)
- {
- UART_Remappable_Read_Text(output, "OK", 15);
- UART_Remappable_write_Text(output);
- delay_ms(100);
- }
- }//loop ends......
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement