Keil™, An ARM® Company

MCB2100 User's Guide

BLINKY

The BLINKY program flashes one LED at a time in sequence, back and forth continuously, and outputs the value of A/D converter input AIN0 to the serial port. The on-board potentiometer (POT1) controls the analog voltage input to AIN0 and the converted, digital result determines the speed of the LED display sequence.

The BLINKY 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 BLINKY

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

  • \KEIL\ARM\BOARDS\KEIL\MCB2100\BLINKY\
    (for the Keil toolchain),
  • \KEIL\ARM\GNU\BOARDS\KEIL\MCB2100\BLINKY\
    (for the GNU toolchain),
  • \KEIL\ARM\ADS\BOARDS\KEIL\MCB2100\BLINKY\
    (for the ARM ADS toolchain).

Select Project File Dialog

Project Workspace When the BLINKY 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.
  • Serial.c contains the serial I/O routines for the UART interface.
  • Blinky.c contains the application module that monitors analog input, provides the text output, and toggles the LEDs.
  • lpc21xx.h is a header file that is included in Serial.c and Blinky.c.

The Abstract.txt file contains documentation about the project.

Editing BLINKY

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

Running BLINKY

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

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