View Full Version : BS1USB to Visual Basic
10-29-2009, 08:39 AM
I am new using BASIC STAMP 1, and i have a project called lane simulator which i used BS1-USB to be able to control a simple circuit which i will communicate with my software using VB. by using the input/output pins i will be able to control the circuit for each assigned input/output. Do you have any idea on this. help me guys.
10-29-2009, 08:44 AM
The stamp talks serial but on the bs1 I don't remember if it does it over the USB port. Check the documentation for answers.
10-29-2009, 09:03 AM
The BS1 is very limited in how it can communicate over the programming port which, on the BS1-USB, is the USB port. There's a Nuts and Volts Column on decoding the DEBUG output which is the only communications other than programming that can be done over the USB port.
See: www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv20.pdf (http://www.parallax.com/Portals/0/Downloads/docs/cols/nv/vol1/col/nv20.pdf)
10-29-2009, 09:43 AM
oh I see. anyway my design goes like this, on my circuit board i have 3 switches for my input, 5 LEDS for my output. from there going to the BS1-USB connected in pin0-pin7. and BS1-USB to the PC which i have a VB software that will communicate with the input/output of the board. my input works fine but how will i control the output using my VB software.? Help me guys.
thanks again! :)
10-29-2009, 10:47 AM
You will not control the output, the stamp program does that. Your VB will send and receive data from the stamp and the stamp will perform some task depending on what is sent to it. Please read some of the articles in nuts and volts and in the PDF files in resourses to find out how to communicate to the stamps. There are plenty of examples on doing this.
10-29-2009, 11:00 AM
There's no way to get data back into the BS1 from the PC through the built-in USB interface except by downloading a new program to it.
It is possible to download a new program to the BS1 using VB, but I don't have a link to the download protocol.
You could use a separate USB to serial interface if you had a spare I/O pin, but you don't have that.
10-29-2009, 11:53 AM
I used the debug viewer in VB6 I downloaded here.. I was able to communicate it using the BS1-USB. a certain bytes was display in the screen. I used this to interface my input/output function. my input works fine because i used switches for high/low of its input. but i really want to know is how I will send data to the stamp and trigger its output? help.
10-29-2009, 12:34 PM
You can't send data to the BS1 via its built-in USB interface. It can't be done.
You can send data to the PC using the DEBUG statement.
You can download a program to the BS1 from the PC. That's all.
You can attach a completely separate USB to serial adapter (like Parallax's USB2SER adapter) to one or two of the BS1's I/O pins and use that to communicate with a PC, but you need one I/O pin for each direction you want to send information.