On 10/11/06, R. Steve McKown <[EMAIL PROTECTED]> wrote:
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

I updated the msp430 ADC12 TinyOS 2.x code last Monday to include DMA
support and also did a couple of other changes (new HAL interface,
renaming, optimization...), so the code might not be compatible with
HEAD. TEP 101 is still not finalized, but I don't expect any major
changes to come. Since people seem interested in multi-channel
sampling, I'm going to check something in (hopefully) in the next few
days (for 2.x).

I have only glanced over your code, but my plan was to add a separate
interface Msp430Adc12MultipleChannel instead of extending the main
interface (this is the reason why the current interface is called
Msp430Adc12SingleChannel). I'm not sure about the union approach
(passing a pointer to a pointer is a litte contrary to traditional
TinyOS design patterns :)), but maybe I can integrate some of your
code in the new version - I have to check and will talk to you
(offline).

Jan
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to