serialF0  1.3
Serial stream for HvA-Xmegaboard
serialF0_test.c File Reference

Example for serialF0 (serialF0.c and serialF0.h) More...

#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdio.h>
#include "serialF0.h"

Macros

#define F_CPU   2000000UL
 Clock frequency.
 

Functions

int main (void)
 main routine example for HvA-Xmegaboard More...
 

Detailed Description

Example for serialF0 (serialF0.c and serialF0.h)

Author
Wim Dolman (w.e.dolman@hva.nl)
Date
16-04-2016
Version
1.3

This example for HvA-Xmegaboard with streams using serialF0.c and serialF0.h.

This example uses scanf to receive a byte and to send this byte back in a formatted text string.

The baud rate is 115200.

This example is code 19.21 from 'De taal C en de Xmega' second edition, see Voorbeelden uit 'De taal C en de Xmega'

Function Documentation

◆ main()

int main ( void  )

main routine example for HvA-Xmegaboard

It initializes the standard streams for the serial interface(USART0 of port F) of the HvA-xmegaboard.

It wait until it receives a character from the UART and sends the character back in a formatted text string.

Returns
int