Saturday, November 5, 2011

.Net Micro Framework - LCD driver.

I have a loooong running project I come back to from time to time to get the .Net Micro Framework running on one of these boards. They are an ARM 7 TDMI based boards with 16k internal ram, 265 k internal flash, as well as 1 meg of external ram and 4 megs of external flash. It basically exposes most of the processors free pins, and add handy things like voltage regulator, crystal, and an FTDI usb/uart for uploading firmware via the built in bootloader on the LPC22xx chips. It has a 20 pin JTAG connector too, which is what I usually use.

My LCD setup, the LPC2294 is the red pcb in the lower right,
the red pcb in the upper left is a Open Logic Analyser
from Dangerous Prototypes. The car sticker on my desk is a
"gift" from my son :)

Anyways, I've had the Framework booting and running from the external flash for a while, I can also connect Visual Studio up to the board and upload and debug simple C# code. I recently rediscovered some Nokia LCD's I bought a while back, and wanted to add native support for it as display device. If I remember right, if you check the Netduino forums, someone has written C# code to try and interact with the chip. But it doesn't get you as much as the Native level support, and pushing pixels tends to be very intensive, so why not let C++ step in an do what it does best. Native support also lets you use dnmf's UI framework, loosely based on WPF/Silverlight.

The neat thing about this was the odd bedfellows of technologies used, From .Net to C++ to using a logic analyzer to debug the bus communications.

The following picts illustrate why I think embedded development is so cool:

I bought a bunch of the boards, so the effort to port the framework isn't a one off. There are a lot of nicities using the framework that are unusual on an anemic platform like this such as full threading support, string processing, garbage collection, Date/Time processing, and even XML! As you can imaging, all this comes at a cost, but my plan is to use these for "high level" type logic that does not need to be near real time, and delegate time critical tasks to another chip, or native code.


No comments:

Post a Comment

I welcome you're thoughts. Keep it classy, think of the children.