[Tinyos-help] Re: DAC on telosb

Poornima Jayarao pjayarao at yahoo.com
Tue Sep 20 14:08:48 PDT 2005


Hi Joe,

I updated to TinyOS 1.1.13 and still found the 
syntax errors. However on adding msp430regtypes.h
with the following two lines, the syntax errors 
went away: ( are these additions correct?)
#define TYPE_DAC12_0DAT uint16_t
#define TYPE_DAC12_1DAT uint16_t

I was able to compile and install on the 
telosb / tmote device. I was able to see the
Leds turn on in the following order:red, green
and after a while(~1/2 sec) yellow(blue) led.

Q1: Does the DAC0 output on U26 pin 1, i.e. ADC6/DAC0
signal pin ?
Q2: Does the sine wave keep repeating or do I need to
change the TIMER_ONE_SHOT to TIMER_REPEAT? I am unable
to see the waveform on my scope. I have an 8 Ohm
speaker on the signal pin and hope to hear the sound.
Does the DAC driver sufficiently to hear the sound on
the speaker or do I need to amplify the signal?

Thank you
Regards
pj


--- Joe Polastre <joe at polastre.com> wrote:

> Update to TinyOS 1.1.13
> 
> On 9/20/05, Poornima Jayarao <pjayarao at yahoo.com>
> wrote:
> > Hi Joe,
> > 
> > Thank you very much for your help.
> > I downloaded your proposed DAC solutions and
> installed
> > them in appropriate places and did the make tmote
> > as you had in your message. Listed below is what I
> > get. Please let me know how to fix this syntax
> error.
> > I am using tinyos-1.1.11
> > Best Regards
> > pj
> > 
> > mkdir -p build/telosb
> >     compiling TestDAC12DMAC to a telosb binary
> > ncc -o build/telosb/main.exe
> > -Os -mdisable-hwmul
> > -I/opt/tinyos-1.x/tos/lib/CC2420Radio
> > -I/opt/tinyos-1.x/tos/../beta/STM25P
> > -Wall -Wshadow
> > -DDEF_TOS_AM_GROUP=0x7d -Wnesc
> > -all -target=telosb
> > -fnesc-cfile=build/telosb/app.c
> > -board= -I../../tos/platform/msp430
> > -I../../tos/platform/msp430/adc
> > -I../../tos/platform/msp430/dac
> > -I../../tos/platform/msp430/dma
> > (.....bunch of lines deleted for brevity.......)
> > TestDAC12DMAC.nc -lm
> >
>
C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/msp430/dac/HPLDAC12M.nc:25:
> > syntax error before `DAC12_0DAT'
> >
>
C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/msp430/dac/HPLDAC12M.nc:27:
> > syntax error before `DAC12_1DAT'
> > make: *** [exe0] Error 1
> > 
> > --- Joe Polastre <joe at polastre.com> wrote:
> > 
> > > You may want to check out this message from
> > > tinyos-msp430, as it is
> > > the "beta" version of the drivers that will make
> > > their way into a
> > > TinyOS release shortly.
> > >
> > >
> >
>
https://mail.millennium.berkeley.edu/pipermail/tinyos-msp430/2005-August/000216.html
> > >
> > > -Joe
> > >
> > > On 9/19/05, Dan Steingart <steinda at berkeley.edu>
> > > wrote:
> > > > I've got some DAC on telosb code working.  On
> the
> > > 6 pin header, the
> > > > #1 and two pins are 0 and 1 respectively.  I
> call
> > > it directly with
> > > > these lines:
> > > >
> > > > For Pin 1 (port 0)
> > > >
> > > > To set the pin to 0 V
> > > > DAC12_0CTL = DAC12IR + DAC12AMP_1; // This
> grounds
> > > the pin
> > > >
> > > >
> > > > To set the pin to some value between 0 and 2.5
> V.
> > > > DAC12_0CTL = DAC12IR + DAC12AMP_5 + DAC12ENC;
> //
> > > Internal ref gain 1
> > > > DAC12_0DAT = X ;// where X is some value
> between 0
> > > and 4095
> > > >
> > > > 4095 is 2.5 V, and 0 is 0V, the it's linearly
> > > related in between.  I
> > > > find that grounding it works better than
> setting 0
> > > V.
> > > >
> > > > To use Pin 2 (port 1) use 1CTL and 1DAT,
> > > respectively.  If anyone
> > > > wants I can make a demo application for this
> > > functionality.
> > > >
> > > > Dan
> > > >
> _______________________________________________
> > > > Tinyos-help mailing list
> > > > Tinyos-help at Millennium.Berkeley.EDU
> > > >
> > >
> >
>
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
> > > >
> > >
> > 
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


More information about the Tinyos-help mailing list