On Jun 15, 2007, at 1:46 AM, Oussama Chougna wrote:
Hi Phil,
Are you sure about this:
Timer.fired() {
call Channe1One.read();
call ChannelTwo.read();
call ChannelThree.read();
call ChannelFour.read();
call ChannelFive.read();
call ChannelSix.read();
}
Is the first approach only possible with the HIL ADC component
ADCReadClientC? Because with the (msp430) HAL interfaces the client
should
do resource arbitration. (request() , configure() , getData(),
dataReady() ,
release() ). So you cannot call getData() of each channel one after
the
other in the timer.fired() event?
Ah, then what you what to do is
acquire resource
sample 1
sample 2
sample 3
sample 4
sample 5
sample 6
release resource
Basically, for maximum efficiency you don't want the lock (resource)
to go idle. That's why enqueueing all the requests as I showed with
the HIL is desirable. The lock won't be released until the sixth
channel is read.
Which would you recommend for 100 Hz sampling? (HIL or HAL)
You want to sample all 6 sensors at 100Hz? I'd say try using the HIL
(it's simpler) and if it can't do the job use the HAL. The one thing
to be careful of is that if you let the ADC go idle long enough, it
might power down the voltage reference, which has a 17ms warmup time.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help