[En-Nut-Discussion] Baud rate question

Konrad Eisele eiselekd at gmx.de
Wed Mar 25 20:03:13 CET 2009


Im using a Crumb128 board with a atmega128 on it.
I programmed the clock fuses to 1 mhz internal 
rc oscillation. Now I would like to output some 
characters on the uart port. Im using parts of the 
example  from the ethernut homepage an do a:
..
u_long baud = 9600;
_ioctl(_fileno(uart), UART_SETSPEED, &baud);
..

The crumb128 board has a silicon labs CP2102 
uart-to-usb bridge on it. I have connected 
the usb port to minicom in linux and device is
detected.

Im periodically writing out a simple string in ehternut,
inside minicom I can now see that some garbage is
periodically apearing. That suggests that the 
baud rate is not configured corectly. So
my question is:

What are the correct values to UBRR0
I have added 
NUT_CPU_FREQ = "1000000"
NUT_DELAYLOOPS = "1000"
to my ethernut configuration. Id like to use the 9600
baud rate. It shold be slow enough for a 1mhz configuration,
or am I wrong?

-- Konrad




-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01



More information about the En-Nut-Discussion mailing list