Check the contrib package out of CVS.  I there, you will find the
following directories:
/opt/tinyos-2.x-contrib/ecosensory/apps/ReadMoistureSensors
/opt/tinyos-2.x-contrib/ecosensory/tos/sensorboards/a2d12ch

This will provide you with examples of using the a/d converter.
Also look at the source code in the chips/msp430 directory.
/opt/tinyos-2.x/tos/chips/msp430/adc12
Of course, these directories may vary given your system.
Eric



On Wed, Sep 24, 2008 at 4:12 PM, Mubashsharul Islam Shafique
<[EMAIL PROTECTED]> wrote:
> Hello everyone!
> I want to read ADC port in TOS2.
>
> In TOS 1, I used ADC and ADCControl interface to directly read from ADC port
> of TMoteSky motes (as shown below). In TOS2, however, I can't find an
> interface to read ADC port. I would appreciate if you can guide me in
> reading ADC port in TOS2.
>
> **part of Header file
> =============
>  enum {
>    TOS_ADC_ADC0_PORT = unique("ADCPort"),
>    TOSH_ACTUAL_ADC_ADC0_PORT = ASSOCIATE_ADC_CHANNEL(
>      INPUT_CHANNEL_A0,
>      REFERENCE_VREFplus_AVss,
>      REFVOLT_LEVEL_2_5
>    ),
> };
>
> **Wiring:
> ==========
> ..............[here ADCtoRadioM.nc is the mail application]
>   ADCtoRadioM.ADCO -> ADCC.ADC[TOS_ADC_ADC0_PORT];
>    ADCtoRadioM.ADCControl -> ADCC;
> ..............
>
> **Application:
> =========
>     call ADCControl.init();
>     call ADCControl.bindPort( TOS_ADC_ADC0_PORT, TOSH_ACTUAL_ADC_ADC0_PORT
> );
> ............
> ............
>       call ADCO.getData();
> .............
> .............
>   async event result_t ADCO.dataReady(uint16_t adcdata)
>   {}
> ............
>
> Now, can anyone please tell me how I can read ADC port in TOS2?
>
> Thanks,
> Shafique
>
>
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
>
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to