Showing posts with label mbed. Show all posts
Showing posts with label mbed. Show all posts

Tuesday, November 2, 2010

Renesas RX Design Contest

The Design Contest seems to be the new weapon of choice for microcontroller manufacturers to get attention for their products. NXP is currently running the mbed Design Challenge and two weeks ago Renesas announced their RX Design Contest. Over $110,000 worth of prizes will be distributed amongst the participants.

The Design Contest is also a good way for electronics enthusiasts to get a nice piece of hardware for free. NXP is handing out LPC1768 Cortex-M3 mbed modules for free and the first 1,000 participants of the Renesas contest get a complimentary RX62NRDK development board.

This board supports most flavors of USB, has a color graphics display, LEDs, buttons, SD-card connector and whatever you may need in a project. Random particpants will also get a full licence for Micrium uC/Probe together with the book uC/OS-III RTOS for the Renesas RX.

The contest finalists will be announced on March 13, 2011. The final judging will be at the ESC in San Jose, California on May 3, 2011.

(See also here and here for other contests.)

Tuesday, May 4, 2010

Fast prototyping with mbed

Tipped off by my friend Gregory I recently bought an LED panel with 32x64 two-color pixels (that is a total of 4096 LEDs!, ref. DE-DP100 from Sure Electronics). I wanted to make some sort of message board out of it, but I was not sure what would be the easiest way. And then suddenly it struck me: why not use an mbed module? The mbed module would offer me programming in C/C++ and a USB file system that would be perfect for storing message files written on a PC. mbed is for fast prototyping and this would be a nice project to see if mbed’s promises would hold true.

Although the LED panel is supposed to run from 5 V and an mbed module from 3V3, studying the LED panel’s PCB revealed that it was built with HC logic only and so it should be possible to run it from 3V3. That was one problem out of the way, no level shifters needed, and I hooked up the mbed to the LED panel with just 12 wires. Note that the mbed module itself is powered from the USB port.


The LED panel has an SPI-like interface and is rather easy (albeit a bit bizarre) to control. It took me some time to figure out that the datasheet provided by the vendor had the CLK and the LATCH lines swapped, but after that I was able to put pixels where I wanted them and in the color of my choice (red, green, orange and black).


The next step was to add a font so that I could write text. If you have ever bitmapped a font you know how tedious a work that is, so I turned to the web. A quick search found me a freeware utility called The Dot Factory and 10 minutes later I had a C source file ready with all the printable characters from an 8-point Arial font (but that could have been any of the fonts available on my PC). That is so much faster than doing it by hand! Another 15 minutes of coding later I was able to print a string on the display anywhere I wanted.

Now I needed a way to get text from a file on the display, together with some commands to control the way the text would be shown. This meant adding an mbed file system object to my code (1 line). Of course I wanted text scrolling, color & position control so I decided to use an INI file for this. A new search on the internet found me a neat little C library named inih that turned out to be very ergonomic: importing and integrating it into my mbed project took a mere 5 minutes; I am definitely going to keep this library!

The final task now was to implement text scrolling properly. This was actually not too difficult using a cheat and thanks to the way the font was implemented. About one hour later I had it all working the way I wanted.


This is the point where features started creeping in. It would be nice to have several pages of text, scrolling should be possible in both directions, scroll speed per line, etc., etc. This is also the point where I started wasting time. Add feature, compile, check, change, compile, check, change, … After some hours of this I decided to stop and freeze the project; you have to draw the line somewhere.

The result is pretty satisfying. The message board can now display seven pages of four lines of text. For each line you can specify a color, an (x,y) position and a scroll speed and direction. Two global parameters allow you to control overall scrolling speed and display brightness, but these are not so useful. I added a push button to browse the pages. Watch this short video to see the result.



The mbed environment really helped to finish this project quickly, the hardware is ridiculously simple and the software is pretty small. The executable is 51 KB and needs 5.5 KB of RAM (mainly for message storage). All in all I think I spend about one day cooking this up, that’s not too bad, isn’t it?

You can download the source code from here.

Sunday, February 7, 2010

LPCXpresso design contest

Last week I received two LPCXpresso boards designed by Embedded Artists for evaluation. An LPCXpresso board is a small but longish 35 by 140 mm board split in two parts. One part has an ARM Cortex (M0 or M3) processor from NXP (LPC1114 or LPC1343) on it, together with a 12 MHz crystal and a small prototyping area. The other part of the board is the LPC-Link, which is a real JTAG programmer/debugger. This part is a sort of detachable JTAG pod and if you cut the connections between the two rows of JTAG connector pads you can connect it to other compatible hardware, your own ARM board for instance.

Why is this interesting? Well, first of all because of the price, since Embedded Artists sells it for only 20 euros. This means that you can get yourself a JTAG debugger for a very good price.

Then there are the development tools (Windows only, but should also work on virtual platforms with USB support on other operating systems). The boards are supported by a free enhanced Eclipse-based IDE developed by Code Red. This software lets you compile programs of unlimited size, but program and debug only up to 128 KB. The NXP web site has a list of compatible processors which is unfortunately missing the LPC2148, but according to NXP it should work with unlisted controllers too, as long as you respect the 128 KB limit. I have yet see this as the IDE does not allow picking an incompatible controller and an LPC2142 is not an LPC2148.


LPCXpresso LPC1114 together with an mbed module and the mbed pin-out card. Everything on the left of the pin-out card is the LPC-link JTAG pod.

Note that the LPCXpresso is pin compatible with an mbed board. That may seem strange as an mbed module only has 40 pins whereas an LPCXpresso has 54, but pin 1 to 20 and pin 28 to 47 of the LPCXpresso module have (where possible) the same functionality as the mbed pins. One problem though, the mbed processors (LPC1768 and LPC2368) are not supported by the LPCXpresso IDE. I have been told though that a Cortex-M0 mbed is coming soon.

Also interesting is that NXP has launched a design contest. Anyone entering a valid design concept before the 8th of March 2010 will receive a free LPCXpresso development kit and then has about one month to actually build it and show that it works. Check out all the details here.