I am attempting to communicate via the Comm port to the BS2sx through Visual Basic so I can log data. What is the serial setting? (Baud rate, parity, etc.?) ·
You can set the baud rate the BS2sx uses through the 'baudmode' parameter. I find 9600 baud most useful, but you'll have to look up in the manual what baud-mode constant for the BS2sx corresponds to 9600 baud.
The BS2 only does 8-bit, no parity or 7-bit, even parity. Again, selected with a flag on the baudmode constant.
And if you use the 'programming' port, (SEROUT 16, ...) then I believe you should use 'Inverted' mode -- again, yet another flag on the Baudmode constant.
allanlane5 said...
You can set the baud rate the BS2sx uses through the 'baudmode' parameter. I find 9600 baud most useful, but you'll have to look up in the manual what baud-mode constant for the BS2sx corresponds to 9600 baud.
The BS2 only does 8-bit, no parity or 7-bit, even parity. Again, selected with a flag on the baudmode constant.
And if you use the 'programming' port, (SEROUT 16, ...) then I believe you should use 'Inverted' mode -- again, yet another flag on the Baudmode constant.
Do you by any chance have any sample code that shows a visual basic and bs2 communicating?
Please see the attached.· Note it is for a BS2, so you'll need to change the
baud-mode constant for a BS2sx.· I keep saying this, because it can be
really un-obvious to the first-time BS2 user, who typically puts a value
like "9600" in there, expecting that to work.
Comments
The BS2 only does 8-bit, no parity or 7-bit, even parity. Again, selected with a flag on the baudmode constant.
And if you use the 'programming' port, (SEROUT 16, ...) then I believe you should use 'Inverted' mode -- again, yet another flag on the Baudmode constant.
Please see the attached.· Note it is for a BS2, so you'll need to change the
baud-mode constant for a BS2sx.· I keep saying this, because it can be
really un-obvious to the first-time BS2 user, who typically puts a value
like "9600" in there, expecting that to work.
(it's one-way comm, the STAMP/boebot is receive-only)
S_out CON 16
and that should work. Or, you could have used the 'A' example, and it should work unmodified.
But good catch, that.