[Tinyos-help] ADC&MDA300

Christopher Leung christopher.leung at mail.mcgill.ca
Fri Jun 20 06:40:43 PDT 2008


The MDA300 board uses an 8-channel ADC with I2C interface (ADS7828). To
use it, you will need the Atm128I2CMasterC component and it can be found
in tos\chips\atm128\i2c. For information on how to use the ADC, you can
look up its datasheet.

Pins A0 to A6 are connected to channel 0 to 6 on the ADC. The
differential inputs 7, 8, 9, and 10, are more complicated to use because
they are connected to a switch which is connected to channel 7.

As for using Vcc as reference voltage, I do not know which voltage line
feeds the external voltage pin on the ADC.

 

Chris

________________________________

From: tinyos-help-bounces at millennium.berkeley.edu
[mailto:tinyos-help-bounces at millennium.berkeley.edu] On Behalf Of
Antonio Prados Vilchez
Sent: June 19, 2008 5:40 PM
To: tinyos-help at millennium.berkeley.edu
Subject: [Tinyos-help] ADC&MDA300

 

 

Hi TinyOS users!!

I'm using a MDA300 connected to a MICAz to measure a voltage from a
sensor. I want to read from an ADC channel, so I'm using this command:

call Atm128AdcSingle.getData(ATM128_ADC_SNGL_ADC0, ATM128_ADC_VREF_AVCC,
ATM128_ADC_RIGHT_ADJUST, ATM128_ADC_PRESCALE);

I want to read from channel 0 with Vcc as the reference voltage.
However, I always get the same data from the ADC. I've checked the
sensor and it works properly, it gives variable voltages to the MDA300.

Am I using the right command to read from the ADC?

Thanks in advance 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://www.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20080620/a978f447/attachment.htm 


More information about the Tinyos-help mailing list