All Forums
 Microsoft Windows CE
 CE Sample Applications and Utilities
 eVC - ADSmartIO A/D Test Application
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Author Topic  


877 Posts

Posted - 26 Apr 2002 :  10:51:04  Show Profile  Email Poster

This simple application reads ADSmartIO channels PA0 - PA7. It illustrates how to dynamically link to the ADSmartIO library and read A/D channels. All output is to the debug port.

To convert the A/D readings to a voltage, use the following equation:
Vin = counts / 1023 * Vref

counts is the reading from the A/D
Vref is the reference voltage of the A/D converter (e.g. 2.5V for ADSmartIO)
and Vin is the analog input voltage
Note that there may be additional conversion factors needed. For example, the PA7 input on the BitsyX is connected to the power input through a voltage divider, and must be multiplied by 7.2 to yield the input voltage.

Key APIs Used


Lines of Code: 92

Source Download
Rev 2 (16k zip).

Edited by ctacke 31-Mar-2002: added key APIs and LOC
Edited by akidder 13-May-2002: Cosmetic updates added to app
Edited by akidder 8-Mar-2006: Add conversion equation


8 Posts

Posted - 23 Jun 2004 :  18:35:02  Show Profile  Email Poster
Does this work with the Bitsy with the personality board?
Go to Top of Page


877 Posts

Posted - 24 Jun 2004 :  10:50:37  Show Profile  Email Poster
Yes, this application should work on all ADS products.
Go to Top of Page
 Forum Locked  Topic Locked
 Send Topic to a Friend
 Printer Friendly
Jump To:
Eurotech Support Forums © Eurotech Inc. Go To Top Of Page
This page was generated in 0.03 seconds. Snitz Forums 2000