cleverca22
5/1/2012 - 10:31 PM

gistfile1.c

int main() {
        UBRR0H = 0;
        UBRR0L = 52;
        UCSR0B = _BV(TXEN0);
        UCSR0C = _BV(USBS0) | _BV(UCSZ01);
        stdout = &mystdout;
        while(1) {
                int x;
                for (x = 1; x < 1024; x++) {
                        UBRR0L = x;
                        _delay_ms(10);
                        txbyte('U');
                        txbyte('U');
                        txbyte('U');
                        txbyte('U');
                        txbyte('U');
                        txbyte('\r');
                        txbyte('\n');
                        //USART_tx_string("test2");
                        //printf("test\r\n");
                }
                _delay_ms(1000);
                //USART_tx_string("test %d\r\n");
        }
}