Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //#define F_CPU 1000000UL
- #define F_CPU 8000000UL
- #define BAUD 9600 // define baud
- #define BAUDRATE ((F_CPU)/(BAUD*16UL)-1) // set baud rate value for UBRR
- //Usage snippet
- UBRR0H = (BAUDRATE>>8); // shift the register right by 8 bits
- UBRR0L = BAUDRATE; // set baud rate
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement