Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char receive;
- void main(){
- TRISA=0x00;
- ANSELA=0;
- PORTA.F0=0;
- UART1_Init(9600);
- Delay_ms(100);
- while(1){
- if (UART1_Data_Ready()) {
- receive = UART1_Read();
- if (receive=='1') {
- PORTA.F0=1;
- }
- else{
- PORTA.F0=0;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment