Serial Communications over USB cable???
Tom-n-Tony
Posts: 12
I'm realatively new at this and I have a question about a project that I'm working on.· I have a Boe-Bot with a Ping sensor and I downloaded the Ping))Dar program - it's pretty cool.· I'd like to extend the program so that the radar picture is in an Internet Explorer window instead of the debug window.· I'm dividing this program into several steps with the first being to establish communications between the BS2 stamp and an external program (VB or Java, I haven't decided yet).· I've reviewed the SEROUT section of the PBASIC Syntax Guide, but it is referencing serial cables and my BOE is USB connected.·
Does anyone have any advice on how to communicate serial information via a USB cable?
Any advice is welcomed!
Thanks,
Tom
Does anyone have any advice on how to communicate serial information via a USB cable?
Any advice is welcomed!
Thanks,
Tom
Comments
You can use the programming port for serial data communications with your PC. It works with the DEBUG / DEBUGIN statements and can be used with SEROUT / SERIN by specifying I/O pin #16 (see the manual for a description of this). The only caveats:
1) If the PC transmits to the Stamp, everything transmitted will be echoed back to the PC and you have to program the PC to take that into account.
2) When you open or close the PC serial port from your PC program, it will reset the Stamp. You have to program the Stamp to take that into account.
Thanks for the input. I have a USB Boe-Bot so I don't have a serial adapter. I've looked through the Basic Stamp module (version 2.2) regarding the SERIN/SEROUT command and I don't see references regarding how to make them work with a USB cable. They show diagrams of a DB9 and DB25 connector (where PIN's make sence to me), but nothing regarding communication over the USB cable. I must confess, I haven't played with it yet so I'll give it a go, I was just looking for someone to indicate if it is possible and point out any gotcha's I'm likely to encounter.
Thanks,
Tom
To the PC the USB connection is a serial port. You would communicate the same as if it were a DB-9 cable connected. The USB driver for the hardware makes this possible.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering