Antonio,

I have a guess what can be wrong. I assume you're using either the
Atm128AdcSingle or Atm128AdcMultiple interface. While the dataReady
event is slightly different in these two interfaces, in each cases it
has a bool parameter, not an error_t. Notice that the value of the
SUCCESS constant is 0, which happens to be the value of FALSE. That
is, when you think that the dataReady event came back with a SUCCESS,
it is, in fact, coming back with a FALSE.

Let me know if this was the issue.

Janos

On Mon, Aug 29, 2011 at 7:37 AM, antonio rosa
<[email protected]> wrote:
> Hello all,
> I have a problem with the IRIS platform. When I do readings of different
> channels of ADC reading the microcontroller's internal voltage (channel
> ATM128_ADC_SNGL_1_23) the event (dataReady) is SUCCESS but the reading
> (data) is erroneous. I have cheked that if I make two consecutive readings
> of the same channel ADC, everything is correct. However, if I previously do
> a reading from a channel different than  used to read the internal voltage
> and then read channel internal voltage, the value returned by the adc is
> wrong (superior the voltage of the batteries).
>
> In TinyOS.1.x with Moteworks, doesn't  ocurrs this problem. I have reviewed
> the TinyOS-2 driver 1.1 for the module  Adc Atmega1281, and I think the
> problem may be related to reading different channels that aren't managed
> properly.
>
> Regards, Antonio Rosa.
> _______________________________________________
> 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