Hi,
I used ATMega16 UART to communicate with a target device which is of baud 1200 but failed. I then tried to communicate the UART with PC COM Port and terminal software. I found the communication is OK when the baud is from 115200 down to 2400. But straight characters appear when the baud rate turns to 1200.
My baud setting function is:
void uartSetBaudRate(u32 baudrate) { u16 bauddiv=F_CPU/baudrate/16L-1; outb(UBRRL, bauddiv); outb(UBRRH, bauddiv>>8); }
Do anyone has my similar problem? The MCU clock speed is 7.3728MHz.
Thanks!