<html>
<body>
According to the data sheet a Baud rate of 1200 from 16MHz clock requires
a divisor of 832, which is the same as 0x0340.<br><br>
All the best for now,<br>
John<br>
<br>
At 16:02 14/06/2007, you wrote:<br>
<blockquote type=cite class=cite cite="">Content-Type:
multipart/alternative;<br>
<x-tab> </x-tab>
boundary="----_=_NextPart_001_01C7AE94.F806DD09"<br>
Content-class: urn:content-classes:message<br><br>
<font face="Tahoma" size=2 color="#0000FF">Hi<br>
</font> <br>
<font face="Tahoma" size=2 color="#0000FF">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)<br>
</font> <br><br>
<font face="Tahoma" size=2 color="#0000FF"> 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;<br>
</font><br>
<font face="Tahoma" size=2 color="#0000FF">this fails to communicate with
the PC at 1200 baud.<br>
</font><font size=2><br>
</font><font face="Tahoma" size=2 color="#0000FF">If I change it to 9600
-<br>
</font><font size=2><br>
</font><font face="Tahoma" size=2 color="#0000FF"> 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;<br>
</font><font size=2><br>
</font><font face="Tahoma" size=2 color="#0000FF">Then all works ok.<br>
</font><font size=2><br>
</font><font face="Tahoma" size=2 color="#0000FF">Any ideas what might be
wrong??<br>
</font> <br>
<font face="Tahoma" size=2 color="#0000FF">Kind regards<br>
<br>
Richard Handley<br>
</font><font face="Tahoma" size=2>Spectra Displays Ltd<br>
Tel: +44 (0) 1954 261 402<br>
Fax: +44 (0) 1954 261 403<br>
<a href="http://www.spectra-displays.co.uk/">
www.spectra-displays.co.uk</a></font><font color="#0000FF"><br>
</font><font face="Tahoma" size=2 color="#0000FF"> <br>
</font><font face="Tahoma" size=2 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>
</font> <br>
_______________________________________________<br>
Icc-avr mailing list<br>
Icc-avr@imagecraft.com<br>
<a href="http://dragonsgate.net/mailman/listinfo/icc-avr" eudora="autourl">
http://dragonsgate.net/mailman/listinfo/icc-avr</a></blockquote></body>
</html>