/* Test for UART TX buffer */ #include #define TEST1_HIGH PORTD |= (1< #define BAUD 9600L // don't change below, will be calculated #define UBRR_VAL ((F_CPU+BAUD*8)/(BAUD*16)-1) #define BAUD_REAL (F_CPU/(16*(UBRR_VAL+1))) #define BAUD_ERROR ((BAUD_REAL*1000)/BAUD) #if ( (BAUD_ERROR>1015) || (BAUD_ERROR<985) ) #error Systematic baud error above 1.5% which is too high! #endif void uart_putc(uint8_t data) { while(!(UCSR0A & (1<> 8; UBRR0L = UBRR_VAL & 0xFF; while(1) { uart_putc('A'); uart_putc('B'); uart_putc('C'); uart_putc('D'); uart_putc('E'); _delay_ms(100); } }