avr-libc-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-libc-dev] [patch #5343] Add a util/setbaud.h "helper" file


From: Cliff Lawson
Subject: [avr-libc-dev] [patch #5343] Add a util/setbaud.h "helper" file
Date: Tue, 29 Aug 2006 09:13:31 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727)

URL:
  <http://savannah.nongnu.org/patch/?5343>

                 Summary: Add a util/setbaud.h "helper" file
                 Project: AVR C Runtime Library
            Submitted by: clawson
            Submitted on: Tuesday 29/08/06 at 09:13
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open

    _______________________________________________________

Details:

This is a header file to aid the setting of UBRR for an AVR UART. Rather than
calculating the UBRR value to use based on F_CPU and BAUD (which is prone to
rounding errors) it uses a look up table for popular F_CPU and BAUD values. A
further advantage is that ONLY baud rates that can operate with less than
+/-2% error are offered. Attempts to use an out of range baud rate will just
produce a #error. The file also know when a selected baud rate can only be
achieved using U2X=1 mode and in this case it defines a USE_2X value so that
code to set U2X=1 mode can be wrapped in a #ifdef USE_2X/#endif





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tuesday 29/08/06 at 09:13  Name: setbaud.h  Size: 10.64KB   By: clawson
V1.1 header to set UBRR from given F_CPU/BAUD values
<http://savannah.nongnu.org/patch/download.php?file_id=10626>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?5343>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]