[Top][All Lists]

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

RE: [avr-gcc-list] Re: ATmega168 FreeRTOS code

From: Larry Barello
Subject: RE: [avr-gcc-list] Re: ATmega168 FreeRTOS code
Date: Fri, 7 Apr 2006 07:09:16 -0700

If you do the math, or look at the Atmel data sheet (maybe not in the 168')
the baud bit error rate for 8 & 16mhz crystals is way out of spec for
anything greater than 38.4k.  However, an external 12 MHz crystal works
great for all rates up to and including 115.2k.  This has to do with the
internal baud rate generator limitations and integer math.

I use the internal 8 MHz oscillator in several products and achieve zero
error rates on 4800, 9600, 19.2 and 38.4 and that is without calibration.
BTW I don't bother checking for comm. errors in my code and I never noticed
any (protocol or plain text).

Larry Barello

| -----Original Message-----
| From: address@hidden [mailto:avr-gcc-
| address@hidden On Behalf Of Larsen, Morten
| ActeNO
| >
| > We have been facing a random problem where data sent to the
| > ATMega128 on one of the UARTs (UART1 multiplexed on ports PD2
| > and PD3) gets corrupted. We have verified that the data being
| > transmitted on the line by the sending device is correct (we
| > can see this on a console terminal) so it is clear that the
| > corruption is happening within the  ATMega. We also read the
| > ATMega UART registers and figured out that Frame Errors were
| > occuring. The baud rate was 38400. We brought it down to 9600
| > but the problem still persists. One of the suspects is the
| > clock stability; we are using the internal RC oscillator of
| > the  ATMega.
| >
| > Have UART data corruption issues been seen when using the
| > internal oscillator? At what baud rates?
| Up to 38,400bps works fine (for me, at least ...) -
| above that, corruption starts to occur (BER not measured ...;-)
| 115,200bps seems unusable without calibration.
| >
| > We have Atmel's application  notes for calibration of the
| > internal RC oscillator but we need some time to try that out.
| >
| > Has anyone tried out calibrating the internal RC oscillator ?
| > If so, any tips ?
| There are (at least) two appnotes (see: avrfreaks.net or atmel.com)
| from Atmel describing calibration in SW -

reply via email to

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