Technical reference
This mbed Microcontroller is based on a Cortex-M3 Core running at 96MHz, with 512KB FLASH, 64KB RAM and a load of interfaces including Ethernet, USB Device, CAN, SPI, I2C and other I/O.
Power consumption
- Powered by USB or 4.5v - 9.0v appiled to VIN
- <200mA (100mA with Ethernet disabled)
- Real-time clock battery backup input VB
- 1.8v - 3.3v Keeps Real-time clock running
- Requires 27uA, can be supplied by a coin cell
- 3.3v regulated output on VOUT to power peripherals
- 5.0v from USB available on VU (only available when USB is connected!)
- Current limited to 500mA
- Digital IO pins are 3.3v, 40mA each, 400mA max total
Pins available
- Vin - External Power supply to the board
- 4.5v-9v, 100mA + external circuits powered through the Microcontroller
- Vb - Battery backup input for Real Time Clock 1.8v-3.3v, 30uA
- Active-low reset pin with identical functionality to the reset button.
- Pull up resistor is on the board, so it can be driven with an open collector
Compared to the Arduino, that I think it's wonderful, has several advantages:
- Considerable computing power
- More memory
- 3.3V but 5V tolerant (the cake and eat it too ")
- Very contained dimensions and spacers Friendly such as 40-pin DIP package
- A bag of devices, including Ethernet,
- GPIO pin can "source" 40mA
Think of it as Arduino: The Next Generation. Although the mbed board costs more up front than Arduino, there are capabilities here that would otherwise require costly “shields” and strain every last byte and CPU cycle of the 8-bit ATmega328 processor: Ethernet, USB, SD cards…mbed handles these tasks without any other addons.
The “mbed” module highlights how hardware has become “easyware.” Just plop down the MCU and a few LEDs, and voila, instant EV board. Actually, there are a couple of extra housekeeping chips on the underside of the board starting with a separate LPC MCU devoted to handling the USB interface with the host PC. The extra MCU frees up the main LPC USB interface for your application and minimizes the intrusiveness of host PC communication. There’s also an Ethernet transceiver (aka “PHY’) from National Semiconductor (DP83848). Getting on the ’Net can be as easy as adding an RJ-45 connector, especially since the National part has a “transformerless” option that uses capacitors, instead of a transformer, for coupling.
There’s zero software to install because the tools are web-based. Here’s how it works. All you do is connect the mbed module to a USB port and it is recognized by your PC as a generic mass-storage device just like a typical thumb drive. Open the mbed “drive” and look in the directory to find the “mbed.html” file. Double click it and it will open with your browser just like any other web page. Voila, you’re on the air and ready to start programming with nary a byte of software installed on your PC.
Invoking the “Compiler” link takes you to a web page that acts as an extremely simplified GUI. I guess you could call it a “WUI” (i.e., “Web-based User Interface”) that pretty much boils down to basic file operations (create, open, save) and a button that says “Compile.” Click that and a moment later a link appears that allows you to download the compiled code to your mbed “drive.” Then push the Reset button on the mbed module and the LPCx flashes itself with the new code and you’re off to the races.
Now that you’ve compiled and downloaded your code, it’s time to get up to speed with the debugger.
That doesn’t take long because there isn’t one. Time to resurrect the old ways and use PRINTF for debugging. To that end, the mbed library includes a feature that routes serial traffic across the USB
connection to a terminal emulator running on your PC . Other handy built-in routines are cover I2C, PWM, SPI, etc...
The real saving grace of this setup is the libraries, both the official functions in what they call the “Handbook,” and community-contributed code in the “Cookbook.” A tremendous amount of functionality has been implemented in a concise and usually object-oriented manner. It’s almost comical sometimes, after having worked with other microcontrollers and girding for some expected coding nightmare, only to find that the corresponding library handles a task in a couple of lines (browse through the Handbook and Cookbook for examples). There’s a tendency also to follow stdlib or “UNIX-like” conventions for file access, character I/O, realtime clock access, etc., so existing systems programmers new to microcontrollers will feel right at home, no weird function names or syntaxes.
Going beyond the built-in functions, the mbed webpage has a “Cookbook” link that takes you to a bunch of addon projects and examples. Many of these show how to connect the mbed module to popular I/O devices (e.g., LCDs, sensors, motors, etc.) and there are some handy utilities (e.g., a routine to set the real-time clock).
I found some interesting dishes in the “Cookbook,” starting with a simple web server that exercises the mbed Ethernet interface. Taking advantage of the National transceiver’s “transformerless” feature mentioned earlier, I was able to jack-in simply by cutting one end off an Ethernet cable and connecting the transmit and receive wires directly to the mbed module.
The Bad and the Ugly
There are just a few minor nitpicks: the indicator LEDs on the board. Four of them, scant millimeters apart, all blue…maybe different colors would help to indicate status of debugging better. The other point, referred to open source side, the chance to develop with gcc is not so easy.
If you find the Arduino editor aggravating, the mbed editor will be the same… Like Arduino, there’s no true tab formatting; everything’s expanded to spaces, like it or not. Auto-indent cannot be disabled, and there’s seemingly no command to increase or decrease the indentation of a block of code.
The closed-source nature of the tools may also be off-putting to some. If one finds the Arduino editor distasteful, there are options: get in there and change the code, or simply use a different editor and link with the Arduino libraries manually…it’s all legal and encouraged. With mbed, there are no alternatives.
The mbed Tour page is frank about what the platform is good for, and what it’s not. mbed was intended as a quick prototyping and educational tool, and at that it excels. A lack of features such as a debugger or offline compiler keep this from being a professional-strength development platform, which is okay.