Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: [AVR-Chat] Another push here... Serial on ATmega128

2005-07-06 by Dave VanHorn

>
>Also, does the baud rate prescaler use the system clock
>(internally) by default ?  Is that correct ?
>(meaning I should  not have to mess up with the fuses -CKSEL-
>currently 0001 - also tried 0100 - both for the internal
>calibrated osc).

A couple of things to be aware of:

You definitely want the CKOPT fuse checked, in the studio programmer.
Otherwise, you have selected "vittoz" mode oscillator, which has low 
amplitude, and can cause odd timing results, wrong baud rates, and 
all sorts of other grief, unless you know exactly what you are doing, 
and pay a LOT of attention to oscillator design.

If you do a reboot in your code, do it through the WDT. Do not push 
zeroes and do a return.
I forgot about this little nugget a couple days ago, and was 
wondering why my uart wasn't sending anything even though it was set 
up correctly.
A hardware reset gets to parts of the chip that you can't get to by software.

Yes, the default prescaler source is the internal CPU clock, which is 
the crystal, resonator, or whatever you have selected.
Crystals are accurate enough for serial work. Most resonators are as 
well. The internal RC or external RC is not, except under special conditions.

It sounds like you're trying to use the internal RC for serial which 
will bring misery, because it will almost work. Or it will work now, 
and fail later.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.