I'm working with an ATMEGA8 chip which is part of a bigger board. I'm trying to set the correct baud rate but it seems it's not working.
The ATMEGA8 uses an external crystal oscillator of 3.6864Mhz. To sed the baud rate I use the following lines, as suggested in the datasheet:
#define F_CPU 3686400// Clock Speed
#define BAUD 19200
#define MYUBRR F_CPU/16/BAUD-1
With this configuration i measured times with an oscilloscope and I get a bitrate of 1000bps. Any suggestion?
Thanks in advance