My questions are: what does F_CPU = 8000000 means in Makefile? If I want to run my uC at the default 1Mhz and TX/RX at 2400bps, should I change the define to:
#define FOSC 1000000
#define BAUD 2400
and then also change F_CPU = 1000000 ?
In the comments under this tutorial, people say they have to use 16Mhz external crystal to make it work. But I really want to use the 1Mhz default internal oscillator to make the UART work.
it calculates an acceptably small baud rate error.
The UBR would be set to 0x0019; this is calculated based on the crystal frequency.
If you use the internal oscillator, rather than a crystal, you’ll get larger errors in the baud rate. Normally these errors are important as you use 19,200 and up.