Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
USART Serial Example
Purpose
This example demonstrates the normal (serial) mode provided by the USART peripherals.
Requirements
This package can be used with all SAM-EK with UART/USART and PDC.
Description

On start up, the debug information is dumped to on-board USART port. A terminal application, such as HyperTerminal, is used to monitor these debug information. Open another HyperTerminal to connect with on-board USART port. Then the program works in ECHO mode, so USART will send back anything it receives from the HyperTerminal. You can send a text file from the HyperTerminal connected with USART port to the device (without any protocol such as X-modem).

Usage
  1. Build the program and download it into the evaluation boards.
  2. Connect a serial cable to the UART port for the evaluation kit.
  3. On the computer, open and configure a terminal application (e.g., HyperTerminal on Microsoft Windows) with these settings:
    • 115200 bauds
    • 8 bits of data
    • No parity
    • 1 stop bit
    • No flow control
  4. In the terminal window, the following text should appear:
    -- USART Serial Example --
    -- xxxxxx-xx
    -- Compiled: xxx xx xxxx xx:xx:xx --
    -- Start to echo serial inputs --
    -- -I- Default Transfer with PDC --
    -- -I- Press 's' to switch transfer mode
  5. Send a file in text format from the HyperTerminal connected with USART port to the device. On HyperTerminal, this is done by selecting "Transfer -> Send Text File"(this does not prevent you from sending binary files). The transfer will start and then you could read the file in the HyperTerminal.