In C, integer constants are of type int, which on the MSP is 16 bits. I.e., you're actually sampling every (1000000 & 0xFFFF) 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(1000000UL) 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(1000000) 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 [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
