The code is in an application note for the adxl202. I cannot remember the document number, but I do remember that when I searched for the device, the app note was one of the things on the page I could download. I have not yet tried to use it, so cannot comment on how good or otherwise it is. -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu