Monthly Archives: May 2010

Wikipedia Homebrew device features Cortex M0 processor, all human knowledge.

Gotta love Wikipedia. Gotta love really cheap, powerful Microcontrollers. They are even more delightful when combined.

This is a prototype of a cheap offline wikipedia reader based on a new NXP ARM Cortex M0 microcontroller. It renders offline dumps of Wikipedia or other text formats (books, html etc) with a simple touch interface. The dumps are stored on a microSD card and are rendered on a inexpensive touchscreen LCD. I will publish full schematics, PCB layout and source code to a final handheld version that looks an awful lot like the Microtouch.

The Software

An offline grinder tool converts xml dumps from wikipedia and other sources into a compressed text layout format that is digestible on a small device. The hard part is decompressing and drawing the text with few cycles and very little RAM fast enough for it to feel like a responsive little consumer electronics device rather than a lumbering PC. The keys to this turned out to be a spatial index that allowed fast rendering of segments of a page and hugely simplified compression. The text renderer uses subpixel positioning to help make teeny fonts readable without slowing down drawing.

The Hardware

NXP are onto something good with these ARM Cortex microcontrollers. The are cheap in onesies (<$2), fast (50Mhz), have plenty of memory (32K flash, 8K sram) and have a really nice dev kit (LPCXpresso) with Eclipse based tools and delightful Serial Wire Debug. Hardware breakpoints. 12K gates. Bloody amazing.

This project uses the LPC1114 Cortex M0 but the PCB will also take a LPC13XX Cortex M3 part that is faster (72Mhz) and has full speed usb. The prototype uses a LPCXpresso kit with lots ‘o jumpers and a ILI9325 based LCD, the same as the Microtouch.

What about the AVR?

As it turns out, this also runs just fine on the AVR based Microtouch classic hardware. It isn’t quite as zippy but still works well. The code isn’t really optimized yet and there is probably room for improvement on both platfotms. You might expect the Cortex M0 version running at 48Mhz to be 4 times as fast. It isn’t. The M0 always requires 2 clocks to read or write GPIO (unlike a single clock for the AVR) so the LCD blit loops are at best twice as fast. Code size is about the same as one might expect.

For those of you who have built your own Microtouch device I will make sure the classic hardware is fully supported. For those of you who have not built their own Microtouch yet I hear that there might be a kit in the works. Watch this space.

Until next time,

Update

Code and schematics posted at http://www.lpc1100challenge.com/detail/316

 

Advertisements