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: Dave Hansen
Subject: Re: [avr-gcc-list] Small program for UART not working
Date: Mon, 12 Sep 2005 14:55:11 -0400

From: "Anton Erasmus" <address@hidden>
[...]
> I tried to calculate the baud rate on scope, I found I
> can't get a exactly number, I can only get an
> estimate. Do you know if there's way to set the baud
> rate accurately?

Send 0xAA continiously. That way you get a nice
square wave at the baud rate frequency. If you drop

I thought it was 0x55 (or ASCII 'U') that you wanted, rather than 0xAA.

An idle RS-232 line is in the "Mark" state. Start bit is "Mark" to "Space" transition. Data bits are then sent LSB first, with "Mark" == 1, "Space" == 0, so the LSB has to be a '1'. After the last databit (bit 7 is zero, or "Space"), the stop bit puts the line back into idle ("Mark") for 1 bit time.

This should work for 8N1.

Regards,
  -=Dave






reply via email to

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