Brian,
For a 2.4567 MHz xtal:
UBRR = (2456700/(16 * 9600)) - 1 = 15
Using 16 for UBBR:
Baud = 2456700/(16 * (UBBR + 1)) = 9031.98
%error = (9600 - 9301.98)/9600 * 100% = .06%
Having a UBBR of 15 has not error, UBBR of 16 has a .06% error.
This is probably acceptable for single character transfers but I direct you
to page 168 of the ATmega16L data sheet for a discussion on the effect of
the baud error rate on data transfers.
Ray
________________________________
From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On Behalf
Of Brian
Sent: Tuesday, April 08, 2008 8:44 PM
To: AVR-Chat@yahoogroups.com
Subject: [AVR-Chat] Re: comms problem
> ...and by the way from which data sheet did you get that value from?
> I know you must HAVE double checked the data sheet already....
>
> Regards
>
> John Samperi
The problem came from understanding the STK500. I measured the freq it
was using, nomatter what I set the fuses at it was set at 16Mhz, I was
thinking 8Mhz which i set it to, that may be why 24 worked, measured
from the xtl1 pin. I put my own xtl in to make sure it was operating at
the freq i knew. It now makes sence.
Brian
P.S. If anyone wants to shoot me down or tell me what I do wrong I will
not get mad just strive to be better and learn more. My goal is to be
the best so that I can teach others to be better. not to mention AVR's
are so much fun. I love to see them do what I tell them to do.
[Non-text portions of this message have been removed]Message
RE: [AVR-Chat] Re: comms problem
2008-04-09 by Raymond Hurst
Attachments
- No local attachments were found for this message.