Re: [AVR-Chat] Xtal and Baud Rate
2009-03-09 by John Samperi
At 09:05 AM 10/03/2009, you wrote: >The problem is that the equation I quoted IS giving me the right baud. >I don't know why.. You always get the gremlins, may have to move country!! Have a look at the uart.c file in the example folder (C:\WinAVR-20081205\doc\avr-libc\examples\stdiodemo) The only thing I can think of of is that the clock is not correct (which you have verified) OR the compiler THINKS is something else. Maybe the lack of UL in your #define F_CPU 4000000UL?? Regards John Samperi ******************************************************** Ampertronics Pty. Ltd. 11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA Tel. (02) 9674-6495 Fax (02) 9674-8745 Website http://www.ampertronics.com.au *Electronic Design * Custom Products * Contract Assembly ********************************************************