Skip to content

Instantly share code, notes, and snippets.

@cleverca22
Created May 1, 2012 22:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cleverca22/2571982 to your computer and use it in GitHub Desktop.
Save cleverca22/2571982 to your computer and use it in GitHub Desktop.
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");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment