uvision ulink2 and mcb1700

This content relates to a deprecated version of Mbed

Mbed 2 is now deprecated. For the latest version please see the Mbed OS documentation.

The LPC1768 mbed is based on the same NXP chip used by the Keil evaluation board MCB1700.

It is therefore possible to export an mbed project to uVision targeting the MCB1700 through a ULINK2.

We have documented how to export an mbed project to uVision on these pages:

It follows a simple mbed project driving the Serial Port (COM0), the Analog In (p7 potentiometer) and the 8 LEDs of an MCB1700 board:

Import program

00001 #include "mbed.h"
00002 
00003 BusOut leds(P1_28, P1_29, P1_31, P2_2, P2_3, P2_4, P2_5, P2_6);
00004 AnalogIn in(P0_25);
00005 
00006 int main() {
00007     while (true) {
00008         float value = 8.0 * in.read();
00009         printf("analog in: %f\n\r", value);
00010 
00011         int led_mask = 0;
00012         if (value > 0.5) led_mask |= 1 << 0;
00013         if (value > 1.5) led_mask |= 1 << 1;
00014         if (value > 2.5) led_mask |= 1 << 2;
00015         if (value > 3.5) led_mask |= 1 << 3;
00016         if (value > 4.5) led_mask |= 1 << 4;
00017         if (value > 5.5) led_mask |= 1 << 5;
00018         if (value > 6.5) led_mask |= 1 << 6;
00019         if (value > 7.5) led_mask |= 1 << 7;
00020         leds = led_mask;
00021 
00022         wait(1);
00023     }
00024 }

Import this program, right click on it, select “Export Program...”, then select "Export To: Keil uVision4" and "Export Target: mbed NXP LPC1768".

Unzip the downloaded export archive “HelloMCB1700_uvision_lpc1768.zip” and open the uVision project file “HelloMCB1700\HelloMCB1700.uvproj”.

To run and debug the example program simply press the uVision “Build” and “Download” buttons.


All wikipages