<html>
<body>
It looks like a bug in the Application Builder. I've tried several
different processors, clock rates &amp; baud rates and UBRR0H always
comes back as 0 although the correct value is displayed on the tab.
Devices with two UARTs also have the problem with UBRR1H.<br><br>
All the best for now,<br>
John<br><br>
<br>
At 17:44 14/06/2007, you wrote:<br>
<blockquote type=cite class=cite cite="">It looks like the App Builder
may be truncating the value for UBRR to 8-bits, which would always make
UBRRxH be zero.<br><br>
Need to go and try some other processors and see what happens.<br><br>
All the best for now,<br>
John<br><br>
<br>
At 16:36 14/06/2007, you wrote:<br>
<blockquote type=cite class=cite cite=""><font size=2 color="#000080">
Just had a look and yes the app builder says,<br>
&nbsp;<br>
UBRR = 832<br>
&nbsp;<br>
But the app builder code produced shows<br>
&nbsp;<br>
UBRR = 64<br>
&nbsp;<br>
The MSB is not right, the 9600 does not use the MSB so a value of 0x00 is
ok.<br>
&nbsp;<br>
Have not tested it but just my thoughts.<br>
&nbsp;<br>
VBR,<br>
Patrick<br>
&nbsp;<br>
&nbsp;<br>
</font><font face="Tahoma" size=2>-----Original Message-----<br>
<b>From:</b> icc-avr-bounces@imagecraft.com [
<a href="mailto:icc-avr-bounces@imagecraft.com" eudora="autourl">
mailto:icc-avr-bounces@imagecraft.com</a>] <b>On Behalf Of </b>Richard
Handley<br>
<b>Sent:</b> 14 June 2007 16:02<br>
<b>To:</b> icc-avr@imagecraft.com<br>
<b>Subject:</b> [Icc-avr] Mega 128 Baud Rate funny<br>
</font><font face="Times New Roman, Times">&nbsp;<br>
</font><font face="Tahoma" size=2 color="#0000FF">Hi<br>
</font><font face="Times New Roman, Times">&nbsp;<br>
</font><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.&nbsp; Using the
application builder I get the following (16MHz xtal)<br>
</font><font face="Times New Roman, Times">&nbsp;<br>
</font><br>
<font face="Tahoma" size=2 color="#0000FF">&nbsp;UCSR0B = 0x00; //disable
while setting baud rate<br>
&nbsp;UCSR0A = 0x00;<br>
&nbsp;UCSR0C = 0x06;<br>
&nbsp;UBRR0L = 0x40; //set baud rate lo<br>
&nbsp;UBRR0H = 0x00; //set baud rate hi<br>
&nbsp;UCSR0B = 0x18;<br>
</font><br>
<font face="Tahoma" size=2 color="#0000FF">this fails to communicate with
the PC at 1200 baud.<br>
</font><br>
<font face="Tahoma" size=2 color="#0000FF">If I change it to 9600 -<br>
</font><br>
<font face="Tahoma" size=2 color="#0000FF">&nbsp;UCSR0B = 0x00; //disable
while setting baud rate<br>
&nbsp;UCSR0A = 0x00;<br>
&nbsp;UCSR0C = 0x06;<br>
&nbsp;UBRR0L = 0x67; //set baud rate lo<br>
&nbsp;UBRR0H = 0x00; //set baud rate hi<br>
&nbsp;UCSR0B = 0x18;<br>
</font><br>
<font face="Tahoma" size=2 color="#0000FF">Then all works ok.<br>
</font><br>
<font face="Tahoma" size=2 color="#0000FF">Any ideas what might be
wrong??<br>
</font><font face="Times New Roman, Times">&nbsp;<br>
</font><font face="Tahoma" size=2 color="#0000FF">Kind regards<br>
&nbsp;<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">&nbsp;<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.&nbsp; Any views or opinions presented are solely those of
the author and do not necessarily represent those of Spectra Displays
Ltd.&nbsp; (Registered at 194 Station Road, Willingham, Cambridge CB4
5HQ, UK. Reg No: 2428206).<br>
&nbsp;<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><font face="Times New Roman, Times">&nbsp;<br>
</font><br>
<font size=2>No virus found in this incoming message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.472 / Virus Database: 269.8.15/848 - Release Date:
13/06/2007 12:50<br>
</font><br><br>
<font size=2>No virus found in this outgoing message.<br>
Checked by AVG Free Edition.<br>
Version: 7.5.472 / Virus Database: 269.8.15/848 - Release Date:
13/06/2007 12:50<br>
</font>_______________________________________________<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>
_______________________________________________<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>