[Tinyos-help] ADC switch channel
R. Steve McKown
rsmckown at yahoo.com
Wed Oct 11 09:46:39 PDT 2006
Hi Jan,
(and those looking for multi-channel ADC)
On Wednesday 11 October 2006 07:14 am, Jan Hauer wrote:
> what you want to do is possible with the msp430 ADC12, but it has not
> been implemented, neither in TinyOS 1.x nor 2.x.
I've been meaning to clean up a modification of the msp430 adc12 peripheral I
put together to support sequence of channels and repeating sequence of
channels, as covered in the msp430 family user guide. The code is compatible
with tinyos-2.x CVS devel branch from 2006-09-26 but doesn't implement the
newer FastClient interface.
This code works well but is lightly used. It's being used to sample a 3-axis
accelerometer at 30kSa/sec (10kSa/sec * 3 channels) as well as low-frequency
sampling of a group of ADC inputs using 'standard' ADC interfaces (Read,
ReadNow, ReadStream).
The code changes the adc12 interface (Msp430Adc12.nc) and the configuration
structure (msp430adc12_channel_config_t). The former change is mostly hidden
by updated adc client components; the latter change requires user code to
update its component(s) containing configuration structure(s).
I've included some Makefile snippets to show how to use this code without
altering your /opt/tinyos-2.x tree, and some code snippets to show how it
works.
I've been meaning to open a dialog with you about how I could contribute to
enhancing the standard peripheral code. I would appreciate your thoughts.
For those looking for multi-sequence conversions, this code should be workable
for you in the mean time. Please note this code is not likely to be plug and
play for you, so I'd avoid it unless you are ready to dig in and tweak it to
fit your version of TinyOS. It shouldn't be too difficult.
All the best
Steve
-------------- next part --------------
A non-text attachment was scrubbed...
Name: msp430sequence.tgz
Type: application/x-tgz
Size: 21711 bytes
Desc: not available
Url : http://mail.millennium.berkeley.edu/pipermail/tinyos-help/attachments/20061011/ee351286/msp430sequence-0001.bin
More information about the Tinyos-help
mailing list