TeleHealth Hardware/Programming

From OLPC
Jump to: navigation, search
  This page is part of the OLPC Health Project. Hardware | Software | Content | Health Jam
XO Caudecus

Goals

Mel's goals

One of my big goals in writing firmware for the TeleHealth module is using it as an example peripheral for the XO. The TeleHealth module (though cool) isn't as important to me as having a good demonstration of the peripheral development process, including genericized, well-documented circuit design, some options for board layout and production, firmware, and a python API for allowing Sugar applications to easily talk with the peripheral.

This example will initially be hardware-dependent, but since the firmware for this device will be relatively simple (yet demonstrate a number of probably-common functionalities), I hope to port it to other microcontrollers immediately afterwards; at the moment it appears that initial development will be done with PICs but I'd especially like to port to AVRs since they use standard C and have extremely good gcc support.

Another aspect of the programming of peripherals is a good open-source toolchain for peripheral development itself. I will not use any tools or components that are not open-source and widely available, and plan on writing a microcontroller programming tutorial as I go along (probably more likely that this will happen with the first port to a new microcontroller - almost certainly an AVR - rather than initial prototype development on the PIC itself). Eventually I'd like to try running (and porting, if needed) the programming toolchains to the XO itself, so kids can use their own machines as hardware programming platforms, but that's somewhat off in the future. Mchua 00:12, 8 February 2008 (EST)

Open source PIC programming toolchains

Links

from Andy Barry

Notes from a good friend who's successfully set up pleasant (for him, at least) open-source PIC dev environments before.

I used Piklab to great success -- http://piklab.sourceforge.net/

I also used the open source toolchain -- SDCC for the compiler, although you can (and I did get this working without much trouble) use wine to run MPLab's C18 compiler. Piklab supports the ICD2 (although its debugging could use a few other features) and PicKits firmware version 1.x. Our PicKits at Olin where firmware version 2.x so we actually downgraded one of them to 1.x using a Windows install of MPLab. If you need the 1.x firmware let me know and I'll dig it up.

If you do use SDCC there are a few things you should watch out for -- the PRAGMA CONFIG lines don't work so you have to set the configuration registers manually. If you need that code, let me know and I'll send it over. I never did get USB to work in SDCC but I didn't try very hard and I think there are people out there who have gotten it to work. Mchua 00:12, 8 February 2008 (EST)

Equipment needed

Overall

PIC development

AVR development

Resources

Overall

PIC development

AVR development