Before using the UART you first have to initialize it. The initialization routine Init requires a so called Baud rate divider. See the data sheet on how to get this number. There is a nice online page with WormFood's AVR Baud Rate Calculator. Some devices accept a second parameter for doubling the rate. If you want to use it set it to True.

The AVR.UART specification is written with "use AVR" in mind, but not "use AVR.UART" (as is the case for most AVR utility packages). That is

with AVR;           use AVR;
with AVR.UART;

procedure Toto is
    UART.Init (51);  --  init to 9600 Baud using 8MHz clock frequency

Package Spec


Wiki: Echo
Wiki: Examples
Wiki: Home

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks