Skip to content

Instantly share code, notes, and snippets.

@ricardas
ricardas / usart.c
Created December 24, 2012 01:21
Atmega328: USART
#ifndef F_CPU
#define F_CPU 16000000
#endif
#include <avr/io.h>
#include <util/delay.h>
#define BAUD 9600
#define MYUBRR F_CPU/16/BAUD-1