[Tinyos-help] ReadStream period off on a telosb?

2008-03-04 Thread Sivan Toledo
I am trying to read from the TelosB ADC using the ReadStream interface
(wired to AdcReadStreamClientC), and it seems that when I set a large
period, for sanity checking, the actual sampling period is much
smaller. For example, if I call read(100) when the posted buffers
are of size 8, I get several buffers per second back, rather than 1
every 8 seconds.

Any idea why this is happening?

Thanks, Sivan
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


RE: [Tinyos-help] ReadStream period off on a telosb?

2008-03-05 Thread Michiel Konstapel
In C, integer constants are of type int, which on the MSP is 16 bits. I.e., 
you're actually sampling every (100 & 0x) clock ticks (are those 
microseconds?). To specify a long integer (32 bit) constant, add an L to the 
number. You can also add a U to make it unsigned: read(100UL) should do the 
trick.

HTH,
Michiel

-Original Message-
From: [EMAIL PROTECTED] on behalf of Sivan Toledo
Sent: Tue 3/4/2008 9:07 PM
To: TinyOS Help Mailing List
Subject: [Tinyos-help] ReadStream period off on a telosb?
 
I am trying to read from the TelosB ADC using the ReadStream interface
(wired to AdcReadStreamClientC), and it seems that when I set a large
period, for sanity checking, the actual sampling period is much
smaller. For example, if I call read(100) when the posted buffers
are of size 8, I get several buffers per second back, rather than 1
every 8 seconds.

Any idea why this is happening?

Thanks, Sivan
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help