Shop OBEX P1 Docs P2 Docs Learn Events
BS1USB to Visual Basic — Parallax Forums

BS1USB to Visual Basic

jzmnavarrojzmnavarro Posts: 16
edited 2009-10-29 05:34 in BASIC Stamp
Hi everyone,

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.

Thanks.

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-10-29 01:44
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-29 02:03
    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
  • jzmnavarrojzmnavarro Posts: 16
    edited 2009-10-29 02:43
    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! [noparse]:)[/noparse]
  • FranklinFranklin Posts: 4,747
    edited 2009-10-29 03:47
    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.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-29 04:00
    You can't.

    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.
  • jzmnavarrojzmnavarro Posts: 16
    edited 2009-10-29 04:53
    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.

    Thanks guys!
  • Mike GreenMike Green Posts: 23,101
    edited 2009-10-29 05:34
    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.
Sign In or Register to comment.