xtal design labs incorporated
custom embedded development

xdesignlabs

home
services
contact us
oem

products

xMega
xTach
xLogger
xLED

projects

digital tach
palm adc

xtal's reference

avr guide
pcb tutorial
bookshelf
companies
chip review



Palm ADC interfacing



3

This was originally written up as an article for issue 159 in Circuit Cellar, and is covered in much greater depth there. You can purchase the article online.

There are (millions) of Palm devices out there on the market. It's possible to find them for less than $100, and in some cases, less than $50 - and all of these devices have a nice, graphical screen, support for serial communication, and megabytes of storage - some gigabytes via SD card interfaces. In short, they're ideal accesories for embedded projects and their cost is reasonable enough to make them dedicated instruments.

For example, around my shop, I routinely use one for debugging serial communications, logging temperature readings, and as an interface to embedded controllers.

 

palms as a embedded interface:

1 | 2

 

 

 

get started:

The biggest question is how to get started. See my AVR guide for a quick introduction to the Atmel AVR architecture, what tools you need, and how to get started.

All you need to experiment with microprocessor interfacing on a palm is here:

 

  • A atmega16 microcontroller with a serial driver.
  • The code examples here (compatible with the xMega board, or the STK500)
  • A PalmOS device - the examples here are tested with a Palm m500 and IIIxe)
  • A atmel programmer, like the AVRISP. ($30 @ Digikey, Pt# AVRUSISP-ND)

The example source below contains a precompiled .hex file, and the source code and makefiles to talk to the palmOS programs. Program the xMega with the .hex file, then install and run the Palm examples. You're off and running!

 

palm compiler setup:

The most confusing part of the process is getting the examples set up and running on the Palm. Luckily, Palm has done a good job of distributing a new IDE for palmos. Sign up for their developer connection (free) and you can download the most recent version.

 

serial communication:

The biggest hassle with getting started is finding cables. There's a number of third parties that sell palm connector -> standard serial cables. In a pinch, the cradle the device ships with can be used. The only issue is that these cradles are already nulled - so if your device is designed to be used with a straight through connector, like the xMega, you will need a custom cable or a null modem adapter.

Custom cables are easily sourced on the internet, and I highly recommend buying a reliable, pre-made one if you want to use a palm with a project. Another idea is to have some palm connectors done up with make stereo headphone connectors (3.5mm) on them. These are great; you only need three wires for serial communication, and they're quick connect.

 

source code:

Examples have been updated for ATMega16 and the new AVR gcc distribution:

 

 

questions:

email support@xdesignlabs.com for technical support or application questions.