Shop OBEX P1 Docs P2 Docs Learn Events
Connecting a PC and the BS2.... — Parallax Forums

Connecting a PC and the BS2....

CatspawCatspaw Posts: 49
edited 2011-12-21 03:15 in BASIC Stamp
This may be related to the thread about the PLX......

Tried searching the forum with not much luck.

I would like to use a netbook and Visual Basic as the brains and the BS2 as the functional module.

Everything I've read so far is about connecting the BS2 and using the programming editor (already written to handle the interfacing). But what about using my own app on the PC?

Is this just a hard coding thing where I have to learn my com ports and PC or does any one know of this setup already done here?

Let's say I'm just interested in something simple to learn. Like send a command to turn on one of four leds, then have the BS respond saying it has turned on [X] LED and the PC would tell me that the LED has been turned on.

In this case, I'm probably looking at using only USB based on what the netbook has available (no DB9 connector.).

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-12-08 15:14
    The actual connection between the PC and the BS2 would be the same serial port used for programming with some kind of USB to serial adapter like the ones built-into Parallax's Stamp boards or like the adapters sold by Parallax. The USB driver for the adapter you're using would have to be installed and your program would see a standard serial port. The Stamp sends and receives characters and strings of characters and the PC sees the same.

    Have a look at StampPlot Pro on the Stamp Downloads webpage. There's also an Excel plug-in called PLX-DAQ. You could use Visual Basic and there are some examples using that, but I don't have links to them.
  • ercoerco Posts: 20,256
    edited 2011-12-08 15:40
    Those links are currently just 3 threads away at http://forums.parallax.com/showthread.php?136500-Basic-PLX-DAQ-operation
  • CatspawCatspaw Posts: 49
    edited 2011-12-09 02:48
    I kinda thought the other thread might be related. Between the both of you, I think my question has been answered. Neither the PLX-DAQ nor StampPro are what I'm looking for exacty.

    I think what I am supposed to do is use the USB/Serial interface. Then figure out any protocols/code in VB to establish my direct line of communication.

    Either way, at least I know what and where to research now. I wasn't exactly sure what part of this type of system I should be looking at to do this.

    Thanks.
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2011-12-09 11:06
    Hi Catspaw, I once started a thread that discussed Vb and BS2, it's a non proffesional offering and when I look back there is a lot that could be improved. Maybe you can do that and I feel sure it will quick start you along the VB Stamp comms path.

    link: http://forums.parallax.com/showthread.php?96973-VB-Express-to-Stamp-Template

    Jeff T.
  • CatspawCatspaw Posts: 49
    edited 2011-12-11 06:30
    To finish this out, I think I finally found what I was looking for. I was reading a document that referred to Nuts and Volts. This in turn lead me to the next in the series. So, I went to the resources pages here on Parallax and found Column #89. This is what I needed.

    In this case, it is a serial interface through the DB9. So I will still need the USB to Serial interface. But at least that's just store-bought hardware. The column will set me up to establish my own line of communication through Visual Basic.
  • kutalinelucaskutalinelucas Posts: 80
    edited 2011-12-20 17:18
    I'm coming to the end of a project which uses a C++ created windows application which communicates both ways with 5 BS2 chips and 2 parallax propellers through USB protocol...and its really not that difficult! If you can get your hands on a PIC18F4550 microcontroller and a PicKIt in-circuit programmer (costing about £15 for both), microchip actually have both the software and firmware available in their object exchange that will allow you to light an LED, or get the status of a tactile switch within an MFC application. Its all incredably well documented and a really good stepping stone to creating your own USB HID devices.

    So...once you have your windows-based app sending data to the PIC, you could either use the I2C bus to communicate with your stamps, or make your own bus as theres a bucket load of I/O...

    Just an idea...but If you want to know more just give me a shout.
  • kutalinelucaskutalinelucas Posts: 80
    edited 2011-12-20 17:30
    actually...here you go (http://www.waitingforfriday.com/index.php/Building_a_PIC18F_USB_device) everything on a plate. This one has been designed in C++...but I'm sure microchip would have covered VB too
  • CatspawCatspaw Posts: 49
    edited 2011-12-21 03:15
    Looks like a nice site K.

    I'm sure I'll go thru it very thouroghly.

    I have been doing my reading, then, just got my stamp yesterday. So I can start applying what I've been reading about now. I know the interface is simple and once you have it, you're done messing about with it (more or less.) In that respect, As much as I enjoy writing code, I'm more about the h/w than the s/w. So, between the couple of threads on this now, all us noobs can get it understood and move on to the fun stuff.

    My goal all along has been to do what it sounds like you're doing....a buss system allowing multiple PICs. So having the brains in a PC made sense (never wanted to recreate a PC with stamps...just wanted the slaves.)
Sign In or Register to comment.