Keil™, An ARM® Company

MCB2100 User's Guide

BLINKYCAN

The BLINKYCAN example program flashes one LED at a time in sequence, back and forth continuously, and outputs the value of the A/D converter AIN0 to the CAN2 port which is connected to the CAN1 port. When the AINO value is input through the CAN1 port, the CAN1 port controls the LED display speed. This example project runs the same way as the BLINKY project.

The BLINKYCAN example project demonstrates assembling, compiling, linking, downloading, and debugging using the µVision IDE on the MCB2100 board. The on-board LEDs make it easy to visually verify that the program loads and executes properly. The HyperTerm terminal emulator program makes it easy to verify serial output.

Loading BLINKYCAN

To load the BLINKYCAN project, select Open Project from the Project menu and open BLINKYCAN.UV2 from one of the following folders.

  • \KEIL\ARM\BOARDS\KEIL\MCB2100\BlinkyCAN\

Select Project File Dialog

Project Workspace When the BlinkyCAN project opens, the µVision Project Workspace window displays the source files that make up the project.

  • Startup.s contains the CPU startup code for the NXP LPC2100 devices.
  • Retarget.c contains the retarget layer for target-dependent low level functions.
  • mco.c, mcohw_LPC2.c and user_LPC2.c modules contain the CAN driver and user interface support routines.
  • BlinkyCAN.c contains the application module that monitors analog input, provides the text output, and toggles the LEDs.
  • The Abstract.txt file contains documentation about the project.

Editing BLINKYCAN

You may edit BlinkyCAN.c or review the source code. Double click on BlinkyCAN.c in the Files page of the Project Workspace window. µVision loads and displays the contents of BlinkyCAN.c in an editor window.

Running BLINKYCAN

Perform the following four steps to run the BLINKYCAN Example on the MCB2100 Evaluation Board:

  1. Building BLINKYCAN
  2. Downloading BLINKYCAN
  3. Debugging BLINKYCAN
  4. Checking Serial Output