RenHao

mainProject_main

Jan 9th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.33 KB | None | 0 0
  1. #include "Definitions.h"
  2.  
  3. int main(void)
  4. {
  5.     Initialization();
  6.    
  7.     while (1)
  8.     {
  9.         //_delay_ms(1); // or printf...
  10.  
  11.         //wait for RXC flag
  12.         if (RxFlag) //wait for new byte in
  13.         {
  14.             //PORTB &= ~(1 << PB7);
  15.             PORTB |= (1 << PB7);
  16.             rxcount = 0;
  17.             UDR0 = 'R';
  18.             RxFlag = false;
  19.             TxFlag = false;
  20.  
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment