Shop OBEX P1 Docs P2 Docs Learn Events
Create A Communications Between Visual Basic 6 and Basic Stamp 2 — Parallax Forums

Create A Communications Between Visual Basic 6 and Basic Stamp 2

sahnianasahniana Posts: 12
edited 2009-09-07 06:05 in BASIC Stamp
I am confuse on how to connect/create communications between Visual Basic 6 (VB6) applications and Basic Stamp 2 module. I learn about serial communications in VB6, but there are things that I am really confuse.

1. If I use Basic Stamp Editor to RUN the program, then COM1 (used com port) is locked because it is in use. Then, in VB6 application, I can't access the port because it is in used, then how I want to communicate with it?

I really need help. Thanks.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-05 16:28
    You need to exit from the Basic Stamp Editor. The Editor isn't needed after downloading the program unless you're using the debug window to look at the output from DEBUG statements and the DEBUG and DEBUGIN statements use the same COM port that you'd use for your VB6 interface.

    Once the Editor downloads a program to the Stamp, the Stamp can function completely stand-alone. The downloaded program will start from the beginning whenever the Stamp is reset, whether from turning on the power or pressing a reset button connected to the module's reset pin.
  • sahnianasahniana Posts: 12
    edited 2009-09-06 04:38
    You mean, first download the program to BS2, then close the editor. Run the VB6 application, then RESET the BS2?
  • FranklinFranklin Posts: 4,747
    edited 2009-09-06 18:02
    Depending on what your program is doing you may not have to reset the stamp but it won't hurt.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • sahnianasahniana Posts: 12
    edited 2009-09-06 22:40
    can anyone tell me about commands that i can send to BS2 through serial communication using my VB6 app? maybe commands to run, reset, check bs2 status..and more.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-06 23:09
    There are no commands.

    The Stamp is reset when the DTR line is toggled. You have to control this through the serial port I/O functions. The Stamp will always run after it is reset.

    Anything else will have to be defined by you and you will need a running program in the Stamp to interpret what you send from VB6 and respond to it.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2009-09-07 01:58
    Hi sahniana , the following link centers around Visual Basic Express·2005 but its not too difficult to figure out whats going on and convert to VB6.

    http://forums.parallax.com/showthread.php?p=671804

    Jeff T.
  • sahnianasahniana Posts: 12
    edited 2009-09-07 04:56
    thank you very much everyone for helping. i have one more question. i've downloaded the tokenizer.dll, but i can't find how to use the tokenizer.dll in VB6. can anyone help me?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-07 05:33
    Why do you want to use the tokenizer with VB6?

    There's a document "Using the PBASIC tokenizer library" that's included with the download. That's all the documentation there is. If you don't understand how to use the tokenizer after reading this document, I recommend that you leave it and find some other way to do what you want until you understand VB6 and DLLs much better. It's much too complex to lead you through via a forum.
  • sahnianasahniana Posts: 12
    edited 2009-09-07 05:43
    is there are any example in VB6? i know a little bit about DLL call functions in VB6. i want to create my own IDE, but I am confuse on how to use the DLL.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-07 05:47
    I don't believe there are any public examples. Someone else may have tried it before. Like I said, the document that comes with the tokenizer download is pretty thorough, but it's not simple. If you have specific questions as you go through it, I'm sure someone will eventually answer, but you will have to do the work.
  • sahnianasahniana Posts: 12
    edited 2009-09-07 05:49
    the document provide a simple example in c++..is there are any working example, on how to use tokenizer, in any programming language?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-09-07 06:02
    There is an unsupported Linux IDE downloadable including C++ source on Parallax's website. Go to the main Parallax webpage and click on the Resources tab. You'll see a link for Downloads, then a link to Stamp Software. On that page, there's a download link for the Linux IDE source.
  • sahnianasahniana Posts: 12
    edited 2009-09-07 06:05
    ok..tq mike..
Sign In or Register to comment.