Guest User

Untitled

a guest
Dec 17th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. char receive;
  2. void main(){
  3.  
  4. TRISA=0x00;
  5. ANSELA=0;
  6. PORTA.F0=0;
  7. UART1_Init(9600);
  8. Delay_ms(100);
  9. while(1){
  10.  
  11. if (UART1_Data_Ready()) {
  12. receive = UART1_Read();
  13. if (receive=='1') {
  14. PORTA.F0=1;
  15. }
  16. else{
  17. PORTA.F0=0;
  18. }
  19.  
  20. }
  21. }
  22. }
Add Comment
Please, Sign In to add comment