Dear Mike,
The principle of the ADC on the MSP430F1611 and the function ADC12MCTLx
are clear. But none of those implies an specific order of the sampled
data in the buffer when using the command
Msp430DmaChannel.repeatTransfer. I understand the order will depends on
how this abstraction of the hardware/API is dealing with the buffer and
the ADC. I have not found nothing explicitly mentioned about the order
of the data.
I guessed the order would depends on the order the sensors are
configured. However, this is not the case. In particular I am trying this:
call shimmerAnalogSetup.addGyroInputs();
call shimmerAnalogSetup.AddAnExInput(7);
But whatever is in the 4th 16-bit uint of the buffer is not the analog
channel 7.
According to your understanding, should it be the analog channel 7?
Jose.
On 21/03/2013 10:09, mike healy wrote:
Hi Jose,
I'm not sure if I'm fully understanding your question.
But you might find it helpful to read up on how the ADC on the
MSP430F1611 works, specifically ADC12MCTLx registers and
sequene-of-channels mode (page 17-12 of the user guide:
http://www.ti.com/lit/ug/slau049f/slau049f.pdf).
Then take a look at the implementation of shimmerAnalogSetup
(especially the initADC12MEMCTLx() function):
https://github.com/tinyos/tinyos-main/blob/master/tos/platforms/shimmer/shimmerAnalogSetupP.nc
So, the short answer to your question (as I understand it) is that it
depends on the order the sensors were configured with.
Mike
On Wed, Mar 20, 2013 at 2:48 PM, Jose F. Mingorance-Puga
<[email protected] <mailto:[email protected]>>
wrote:
Hello,
I have been trying to figure it out but still cannot come to a
conclusion.
I call the command Msp430DmaChannel.repeatTransfer to start a
transfer in the ADC. One of the arguments passed to the method is
a buffer where the quantized data should fall. The problem is, how
can I know in which position of the buffer is each channel of
those I am converting?
In the beginning I just observed manually the contents of the
buffer to guess what channel was in what position, but now I am
reconfiguring the converter in runtime, and I do not know any more
in which position each channel goes. For instance, imagine first I
am sampling gyroscope and accelerometer. Then I disable the
accelerometer and read the analog channel 7. It would be useful to
know how to identify what position of the buffer contains each
channel.
Sincerely,
Jose F. Mingorance-Puga
_______________________________________________
Shimmer-users mailing list
[email protected] <mailto:[email protected]>
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users