Changing Datalogger 27937 Baud Rate
I am trying to change the communication baud rate between BS2 and Datalogger #27937. It doesnt seem to work. This is the code I am using to change the baud rate of the Datalogger from its default (9600) to 19200 :
Baud CON 84 ' Serial Baud Rate 9600 bps (BS2)
SEROUT TX\CTS, Baud, [$14, $20, $9C, $80, $00, CR]
I would like to know what I am doing is wrong. If any one has any idea, please let me know. Thanks,
Li
Baud CON 84 ' Serial Baud Rate 9600 bps (BS2)
SEROUT TX\CTS, Baud, [$14, $20, $9C, $80, $00, CR]
I would like to know what I am doing is wrong. If any one has any idea, please let me know. Thanks,
Li
Comments
Your other post was deleted as double posts are not allowed:
http://forums.parallax.com/showthread.php/134682-Forum-Guidelines
Maybe try the ascii mode:
SEROUT TX\CTS, $54, ["SBD $$9C8000", CR]
In general, the Stamp has trouble receiving at higher baud rates due to its unbuffered serial port. Flow control does help with the #27927 datalogger. Nevertheless, the actual throughput will not improve by much, because the Stamp takes time between bytes to process data. You'll never get more than 4800 baud in actual throughput.
'***********[INITIALISE LOGGER & DETECT MEMORY STICK]********* LOW DLTX DEBUG HOME," Remove Memory and Press 1 ",CR DO WHILE idx=0 GP_WORD=GP_WORD+1 DEBUGIN DEC1 idx LOOP DEBUG CLS SEROUT DLTX, 240, ["IPA", CR] PAUSE 200 SEROUT DLTX, 240, ["SCS", CR] PAUSE 200 SEROUT DLTX, 240, [$14,$20,$71,$02,$00,$0D] 'SET BAUD TO 4800 SERIN DLRX, 500,[WAIT(">")] DEBUG "Initialized ",CR PAUSE 200