m0 release

http://mbed.org/media/uploads/dan/m0-more3.png

Information

The first batch of mbed NXP LPC11U24 have now been released!

See mbed NXP LPC11U24

The new mbed NXP LPC11U24 Microcontroller is designed for prototyping USB devices, battery powered applications, and 32-bit ARM Cortex-M0 designs and it is almost ready for launch!

Beta Tester Projects

In order to ensure the M0 mbed is ready for final release we asked developers that we’re interested in testing the M0 mbed with us, to submit a project description that they thought might best utilize the new features of the new mbed.

The feedback from the beta testers has been invaluable and with their help we have ironed out a few minor bugs – so a big thanks for all of your support!

Here are some of the projects that the beta testers have been working on –

Fast logic analyser using Cortex-m0 mbed – Romily Cockling

Prototyping a logic analyser to measure a digital stream using the USB HID class

Flight Simulator Instrument - Michiel B.

The creation of an airplane instrumentation display for a flight simulator making use of the USBSerial class.

Joystick as USB Mouse - Adam Green

Using an mbed-M0 and thumb joystick to emulate a PC mouse showcasing the USBMouse library

RGB LED Strip Controller - Bertrand Achard

Developing a controller for a strip of individually addressable LEDs.

Example: USB Device Interfaces

This is going to be great for building USB devices. In the following video you can see how to emulate a USB mouse.

You can programatically send movement, button clicks and states, and even scroll the scroll wheel, and of course do this dependant on any sensors or logic you like. A really neat feature is the absolute version of the mouse, meaning you can move to a location on the screen; great for direct interaction with program interfaces.

Another example is USB Keyboard:

In this example, we're sending media keys to control the PC media player, but you could of course type strings or send interesting keycode combinations and sequences. A raw USBHID interface is also available to allow driverless custom interfaces to your favourite USB-capable programming language on the PC. We also have some other interfaces on the way, including USB MIDI (Musical Instrument Digital Interface) and USB Virtual Serial.

Example: Use in Battery Applications

This board should be good for prototyping battery applications. Here is an example of it being sent to sleep, woken up by a button to increment and update a screen, then going back to sleep:

It is running from a couple of AA's, and takes a couple of mA when not doing anything. The code is using some new sleep() and deepsleep() functions of the mbed C/C++ SDK. The code for this example uses deepsleep(), and looks like:

Simple deepsleep and interrupt wakeup example

#include "mbed.h"
#include "TextLCD.h"

TextLCD lcd(p21, p23, p24, p25, p26, p27);
InterruptIn wakeup(p14);

int i = 0;

void count() {
    lcd.locate (0,1);
    lcd.printf("%d",i);
    i++;
    wait(0.5);
}

int main () {
    wakeup.rise(NULL);  // Setup rising edge interrupt (no handler function needed)

    lcd.printf("Hello World!");

    while (1) {
        deepsleep();  // Deep sleep until external interrupt
        count();      // We've come out of sleep due to interrupt, so count!
    }
}

For both sleep() and deepsleep(), all state is retained so you can see it is a nice simple programming model. Should be great for quickly prototyping some things that need to run off batteries.