Hi Janos, I have updated the Adc Atmega1281 with the TinyOS Trunk and the problem is result,
Thanks for all, Antonio Rosa. Maybe I will send you some questions about others topics, that I think there is problems o bugs. 2011/8/30 Janos Sallai <[email protected]> > Antonio, > > I have been able to replicate this. Interestingly, only the first > sample should be bad after a channel/vref change according to the data > sheet, unless we're switching to a differential channel, where it may > take up to 125us for the stage to stabilize. I did observe, however, > that the second reading was bad, too, when switching to > ATM128_ADC_SNGL_1_23. > > I checked in the fix. Please get the latest sources from google code. > > Thanks for reporting this. > > Janos > > On Tue, Aug 30, 2011 at 11:18 AM, antonio rosa > <[email protected]> wrote: > > Hi Janos, > > I understand you. I use the ReadNow interface of the AdcReadNowClient > > component, but the source of the problem is that when I do two > consecutive > > reading of diferents channels of ADC, if the first reading is a channel > > different of ATM128_ADC_SNGL_1_23 channel (internal voltage on IRIS) the > > value is correct, and the seconds readings is the ATM128_ADC_SNGL_1_23 > > channel the value is wrong. > > Also, If I read only the ATM128_ADC_SNGL_1_23 channel the value is > correct, > > but when I read other channel in the same application, the read of > > ATM128_ADC_SNGL_1_23 channel is wrong. I have guess that when you read > the > > internal voltage of Atmega1281, the first time the reading is wrong, the > > second time the reading si correct. > > > > In short, if you make several readings of different ADC channels, you > must > > do two consecutive read internal voltage channel and discard the first > > reading because it is wrong, yet the latter is correct. > > > > > > > > read the ATM128_ADC_SNGL_1_23 channel, > > > > 2011/8/30 Janos Sallai <[email protected]> > >> > >> 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
