Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CAN example
\par Purpose

This example demonstrates the basic functions of CAN controller.

\par Requirements

This package can be used with two SAM4E-XPRO boards.
The CAN1 in two board should be connected externally before running
the example.

\par Description

In this example, one board sends messages over CAN bus to another board.
The CAN message will display on the terminal window.

\par Usage

-# Build the program and download it into the evaluation board.
-# 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
-# Connect CAN1 in two boards.
-# Start the application.
-# Upon startup, the application will output the following lines
   on the terminal window.
-- CAN Example --
-- SAM4E -XPRO --
-- Compiled: xxx xx xxxx xx:xx:xx --
  1. Press 'r' key in the terminal window to configure one board to receive CAN message.
  2. Press 't' key in the terminal window to confgure another board to send CAN message. The message will be displayed on the terminal window.