#define F_CPU 1000000 #include #include #include #define BAUD 4800 //This function is used to initialize the USART //at a given UBRR value void USARTInit() { // USART initialization // Communication Parameters: 8 Data, 1 Stop, No Parity // USART Receiver: On // USART Transmitter: On // USART Mode: Asynchronous // USART Baud Rate: 4800 UCSRA=0x00; UCSRB=0x18; UCSRC=0x86; UBRRH=0x00; UBRRL=0x67; } char USARTReadChar() { while(!(UCSRA & (1<