Getting Started - Downloading a Program

source:MicrocontrollerGettingStarted/BoardLayoutSmall.png

The following instructions demonstrate how to download the first program to your Microcontroller, and start it running.

Instructions

1. Save a program binary (.bin) to the mbed Microcontroller

Save the program binary file to your mbed Microcontroller Disk, just like you would with a normal USB Disk. The Status LED will flicker as the PC writes the file to the Microcontroller Disk.

2. Press the Reset Button

When the Reset Button in pressed, the newest program on the mbed Microcontroller Disk will be loaded in to the Microcontroller FLASH memory. The Status LED will flash as this happens.

When the program is has been loaded onto the microcontroller, it will then start it running.

3. Hello World!

The Microcontroller is now running the program; flashing LED1 forever! If you reset the Microcontroller, or disconnect and reconnect the power, the program will simply restart.

4. To download an alternate program

It is the newest program on the mbed Microcontroller that is run after reset. We can therefore download a new program or overwrite an existing one to update the program that will run.

Where Next

Troubleshooting

Make sure you save the file to the mbed Microcontroller!

Don't try and "Open" or "Run" the program files. Always "Save" them to the Microcontroller.

Make sure you set it running!

When you unplug the Microcontroller, you may get a "Device Removal" error message; don't worry!

If you have any problems, or think this tutorial could be improved, please tell us in the Forum!