Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Re: [AVR-Chat] Xtal and Baud Rate

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
********************************************************

Re: [AVR-Chat] Xtal and Baud Rate

2009-03-10 by David VanHorn

On Mon, Mar 9, 2009 at 7:19 PM, John Samperi
<samperi@ampertronics.com.au> wrote:
> 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!!

:) I have the atmel guy coming in with Arrow on friday.

> 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.

My T0 int is firing exactly where I expect, 1mS.  Xtal verified by
scope on Xtal pins.
Fuses set to external osc.

> Maybe the lack of UL in your #define F_CPU 4000000UL??

It's generated by Studio..

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.