[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] Small program for UART not working

From: Gary Bi
Subject: Re: [avr-gcc-list] Small program for UART not working
Date: Mon, 5 Sep 2005 06:22:53 -0700 (PDT)


Thanks a lot for all your advices. I finially have
this worked. Two things are done:

1. The baud rate calculation should be based on
3.686Mhz (default fosc for STK500).
2. Fuse change, I select next option 
Ext. Clock Start-up time:6CK + 0ms [CKSEL=0000 SUT=00]

Another quick question: does anyone know which version
of avr-gcc can support C code compiling for
ATmega165/Atmega325, I have next version:

gcc -v
Using built-in specs.
Configured with: ../gcc-3.4.3/configure
--prefix=m:/WinAVR --build=mingw32 --hos
t=mingw32 --target=avr --enable-languages=c,c++
Thread model: single
gcc version 3.4.3

It did not work with this error: MCU `atmega165'
supported for assembler only.


--- Peter Fuhrmann <address@hidden> wrote:

> On Tuesday 30 August 2005 02:37, Gary Bi wrote:
> > From the scope, I can calculate the baud rate
> rough
> > number, for example, if setting it to 9600 in MCU,
> on
> > scope, it was around that range; setting to 57600,
> the
> > reading from scope will be around 57600, etc. But
> I
> > don't know the exacly reading.
> You might try sending 0xAA on the Atmel and 0xAA on
> the PC at the same time, 
> and then use a two channel scope to compare the
> timing of the two waveforms.
> You could try playing with the UBRR0L value a little
> to get the timing 
> correct.
> regards,
> Peter
> _______________________________________________
> AVR-GCC-list mailing list
> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]