Skip to content

Instantly share code, notes, and snippets.

@dnet
Created December 16, 2012 17:39
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 dnet/4310058 to your computer and use it in GitHub Desktop.
Save dnet/4310058 to your computer and use it in GitHub Desktop.
Arduino workshop: szoftveres teljesítménynövelés (2012. december 13.)
#include <avr/io.h>
int main() {
UBRR0H = 0;
UBRR0L = 103;
UCSR0B = (1<<RXEN0)|(1<<TXEN0);
UCSR0C = (1<<USBS0)|(3<<UCSZ00);
while (1) {
/* Wait for empty transmit buffer */
while ( !( UCSR0A & (1<<UDRE0)) );
UDR0 = 0x55;
UCSR0B = (1<<RXEN0)|(1<<TXEN0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment