SEROUT format for the datalogger?
Cheese
Posts: 29
Could someone point me to a source which explains the SEROUT format for the datalogger? I've gone through the demo and test programs but haven't figured out what the format is. The documentation says that SEROUT writes the data of <size in hex(4 bytes) > to the end of the current open file. I don't understand what that means.
For example,
SEROUT TX\CTS, Baud, [noparse][[/noparse]$08, $20, $00, $00, $00, $0D, CR,
DEC5 counter, ",", DEC5 result, CR, LF, CR]
counter and result are words.
Gene
For example,
SEROUT TX\CTS, Baud, [noparse][[/noparse]$08, $20, $00, $00, $00, $0D, CR,
DEC5 counter, ",", DEC5 result, CR, LF, CR]
counter and result are words.
Gene
Comments
$08 is the command
$20 is an ascii space, part of the command syntax
$00,$00,$00,$0D is the number of bytes, $0000000D = 13
CR is part of the command syntax, ascii code 13
...the 13 data bytes
CR is part of the command syntax
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
SEROUT TX, baud, ("Text" CR)
With the above, I am getting an error because of the CR. I also tried putting a comma and it still didn't work.
I'm trying to use the command to program an XBee module through a Stamp1.
So just define SYMBOL skipLine = CR and then use skipLine in the SEROUT?
The ASCII code/value for a Carriage Return is $0D, which is 13 (decimal.)· In PBASIC1 it's: SEROUT pin, baudmode, ("text", 13)
PBASIC Help shows CR as pre-defined.· SEROUT pin, baudmode, ("text", CR) should work.·
However, I get that compilation error if I use the comma between "text" and CR.·
It tokenizes OK with ("text", 13) --
Post Edited (PJ Allen) : 3/20/2008 2:38:39 AM GMT
I'll have to try that though, thanks!
The issue for me is the data logger!
I need to send a minimum of 10 samples per second to a file on the data logger drive.
The format is comma delimited for a spread sheet.
##:##,##,###.#.#
minuits:seconds,sample number,0-255 value,bit,bit,cr or line feed
The stamp I am using is bs2px24 and the DS1302 Timekeeping Chip.I cant seem to get mS out of the chip so I will just use the second,sample number to break it down
Thanks for keeping the post alive Hijackers welcomed
SEROUT TX\CTS, Baud, [noparse][[/noparse]$08, $20, $00, $00, $00, $12, CR,HEX2 min, ":", HEX2 sec, ",",DEC2 number, ",", DEC3 value, ",",BIN1 bip, ",",BIN1 bop, CR, LF, CR]
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Thanks so much for the input!!!
It is working great now.