// blocking.c // Author: Allen Porter // // Simple AVR serial echo program. This program increments a counter on PORTC // for each byte read, and echos back ascii integers when typed. #include #include #define BAUD 2400 void init(unsigned int baud) { unsigned int ubrr = (F_CPU / (16 * baud)) - 1; UBRRH = (unsigned char)(ubrr >> 8); UBRRL = (unsigned char)ubrr; UCSRB = (1<= '0' && c <= '9') { transmit(c); } } return 0; }