<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16414" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=961431815-14062007><FONT face=Arial size=2>Try UBRR0H = 0x03;
for 1200 baud.</FONT></SPAN></DIV>
<DIV> </DIV>
<P><FONT face=Tahoma size=2>Dave Raymond</FONT><FONT
face="Times New Roman"><BR></FONT><FONT face=Tahoma size=2>Software
Engineer</FONT><FONT face="Times New Roman"><BR></FONT><FONT face=Tahoma
size=2>Gale Banks Engineering</FONT><FONT
face="Times New Roman"><BR></FONT><FONT face=Tahoma size=2>Ph (626) 969-9600
x3301</FONT><FONT face="Times New Roman"><BR></FONT><FONT face=Tahoma size=2>Fx
(626) 334-2376</FONT><FONT face="Times New Roman"> </FONT><BR><FONT face=Tahoma
size=2>Visit us on the Web: www.bankspower.com</FONT><FONT
face="Times New Roman"><BR></FONT><FONT face=Tahoma size=2>E-mail:
draymond@bankspower.com</FONT><FONT face="Times New Roman"> </FONT></P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
icc-avr-bounces@imagecraft.com [mailto:icc-avr-bounces@imagecraft.com]<B>On
Behalf Of </B>Richard Handley<BR><B>Sent:</B> Thursday, June 14, 2007 8:02
AM<BR><B>To:</B> icc-avr@imagecraft.com<BR><B>Subject:</B> [Icc-avr] Mega 128
Baud Rate funny<BR><BR></FONT></DIV>
<DIV><FONT face=Tahoma color=#0000ff size=2><SPAN
class=112505014-14062007>Hi</SPAN></FONT></DIV>
<DIV><FONT face=Tahoma color=#0000ff size=2><SPAN
class=112505014-14062007></SPAN></FONT> </DIV>
<DIV><FONT face=Tahoma color=#0000ff size=2><SPAN class=112505014-14062007>I
have a working piece of code which fails when I try to run it at 1200
baud. Using the application builder I get the following (16MHz
xtal)</SPAN></FONT></DIV>
<DIV><FONT face=Tahoma color=#0000ff size=2><SPAN
class=112505014-14062007></SPAN></FONT> </DIV>
<DIV><FONT size=2><SPAN class=112505014-14062007><FONT size=3>
<P><FONT face=Tahoma color=#0000ff size=2> UCSR0B = 0x00; //disable while
setting baud rate<BR> UCSR0A = 0x00;<BR> UCSR0C =
0x06;<BR> UBRR0L = 0x40; //set baud rate lo<BR> UBRR0H = 0x00; //set
baud rate hi<BR> UCSR0B = 0x18;</FONT></P>
<P></FONT><FONT size=3><SPAN class=112505014-14062007><FONT face=Tahoma
color=#0000ff size=2>this fails to communicate with the PC at 1200
baud.</FONT></SPAN></FONT></P>
<P><FONT face=Tahoma color=#0000ff><SPAN class=112505014-14062007>If I change
it to 9600 -</SPAN></FONT></P>
<P><FONT size=3><SPAN class=112505014-14062007><FONT face=Tahoma color=#0000ff
size=2> UCSR0B = 0x00; //disable while setting baud rate<BR> UCSR0A
= 0x00;<BR> UCSR0C = 0x06;<BR> UBRR0L = 0x67; //set baud rate
lo<BR> UBRR0H = 0x00; //set baud rate hi<BR> UCSR0B =
0x18;</FONT></SPAN></FONT></P>
<P><FONT size=3><SPAN class=112505014-14062007><FONT face=Tahoma color=#0000ff
size=2>Then all works ok.</FONT></SPAN></FONT></P>
<P><FONT size=3><SPAN class=112505014-14062007><FONT face=Tahoma color=#0000ff
size=2>Any ideas what might be
wrong??</FONT></SPAN></P></FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV align=left><FONT face=Tahoma color=#0000ff size=2>Kind
regards<BR> <BR>Richard Handley</FONT></DIV>
<DIV align=left><FONT color=#0000ff><FONT face=Tahoma color=#000000
size=2>Spectra Displays Ltd<BR>Tel: +44 (0) 1954 261 402<BR>Fax: +44 (0) 1954
261 403<BR></FONT><A href="http://www.spectra-displays.co.uk/"><FONT
face=Tahoma color=#000000
size=2>www.spectra-displays.co.uk</FONT></A><BR><FONT face=Tahoma
size=2> <BR><FONT color=#808080>This email is confidential and intended
solely for the use of the individual to whom it is addressed. Any views
or opinions presented are solely those of the author and do not necessarily
represent those of Spectra Displays Ltd. (Registered at 194 Station
Road, Willingham, Cambridge CB4 5HQ, UK. Reg No: 2428206).<BR> <BR>If you
are not the intended recipient, be advised that you have received this email
in error and that any use, dissemination, forwarding, printing, or copying of
this email is strictly prohibited. If you have received this email in error
please notify Spectra Displays by telephone on +44 (0) 1954 261402 or by fax
on +44 (0) 1954 261403<BR></DIV></FONT></FONT></FONT>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>