I identified the problem

6 views
Skip to first unread message

Gowan

unread,
Nov 26, 2010, 8:13:18 PM11/26/10
to RuggedCircuits
This is in reference to the last topic I posted here.

I loaded another pre-written UART program (from the eXtreme site) at
19200 baud.
Then, messing around I set the terminal at 38400 AND IT WORKED!
The UX20 bit in the UCSR0A is off by default, and it has never been
set by any program that I wrote/used.
The datasheet says:
"Writing this bit to one will reduce the divisor of the baud rate
divider from 16 to 8 effectively doubling
the transfer rate for asynchronous communication."

So I added the line setting UX20 to 0 explicitly, and the terminal
worked at the expected 19200.
I don't believe any of the fuses can set it to 2x, so I think that the
bootloader that came installed with the board must do it.
Thanks

Rugged Circuits

unread,
Nov 27, 2010, 10:58:47 AM11/27/10
to RuggedCircuits
On Nov 26, 8:13 pm, Gowan <peterstew...@telus.net> wrote:
> So I added the line setting UX20 to 0 explicitly, and the terminal
> worked at the expected 19200.
> I don't believe any of the fuses can set it to 2x, so I think that the
> bootloader that came installed with the board must do it.
> Thanks

That's a good observation, it is possible that the bootloader
configures registers in a certain way and the "second program" that
runs (i.e., yours) cannot assume that registers have the same values
that they have after reset.

I'm glad your program works as expected now.
Reply all
Reply to author
Forward
0 new messages