avr-gcc-list
[Top][All Lists]
Advanced

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

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


From: David Brown
Subject: Re: [avr-gcc-list] Small program for UART not working
Date: Sun, 28 Aug 2005 22:10:52 +0200

----- Original Message -----
From: "Gary Bi" <address@hidden>
>
> My believe the default baud rate is 57600 and 8-N-1
> for Atmega128L, because in my code, I did not set the
> baud rate, but the hyper terminal side, I need to set
> it as 57600, 8-N-1 (eight bit, no parity bit, 1 stop
> bit).
>

Here's a few points to get you started.  First off, there is no such thing
as a "default baud rate" for a UART - you have to set it explicitly in your
software.  The baud rate divisors are entirely dependant on your clock rate,
so you have to make sure that is as expected as well.  Second,
"hyperterminal" is universally acknoweldged to be the worst terminal
emulator program ever created.  Get a real terminal emulator program so that
you avoid any issues there ("Tera Term Pro" is probably the most commonly
used general-purpose terminal emulator on windows - others on the list may
have other favourites, but stick to TTP for simplicity).  Third, if you have
a scope connected to the Tx pin, then you should be able to see the data
transmitted and figure out if it is correct (assuming you have a digital
scope).  If you don't know what the data should look like, read the AVR
datasheet - identifying and debugging UART communications with a scope is a
useful skill.

mvh.,

David






reply via email to

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