BS2SX Commands From Visual Basic
Note: a little off topic...
Bill,
I'm no expert, but I like the parallel port because there are no timing
issues and less hardware needed at each end of the serial link. The voltage
is 0-5 volts as well but the link is only good for just about 6 feet. It
all depends on what it is you are trying to do. Both interfaces have their
pros and cons. I have figured out how to write to the parallel port in
visual c++ but haven't tried in VBasic yet. (I would be happy to share my
simplistic C code which writes to the 8 data bits of the parallel port for
anyone interested. these bits can be used to control external circuitry and
spin motors and other neat stuff given a simple interface) If anyone has
some simple Vbasic code which writes to the parallel port I'd like to take a
peek. I'm in a VB class now and want the language to control cool dodads.
If anyone wants, email me off the list.
Have Fun,
Jim
> > Wow I was surfing your site today and put both the Serial Port
> > Complete and Parallel Port Complete from Amazon. Thanks for the link.
> >
> > Is there any preference to using the Serial or Parallel port?
>
> Hi Bill,
>
> I prefer the serial port for simplicity, and the fact that you have
several
> ports to use on most PCs. Jans books will definitely get you started, and
> in the right direction. Most of our serial projects were completed using
> Serial Port Complete as a reference.
>
> I had sent so many people to Amazom.com for this book from my article
> pages that I decided to carry this one in stock.
>
> Regards,
>
> Bruce
> webmaster@r...
> http://www.rentron.com
>
>
>
>
Bill,
I'm no expert, but I like the parallel port because there are no timing
issues and less hardware needed at each end of the serial link. The voltage
is 0-5 volts as well but the link is only good for just about 6 feet. It
all depends on what it is you are trying to do. Both interfaces have their
pros and cons. I have figured out how to write to the parallel port in
visual c++ but haven't tried in VBasic yet. (I would be happy to share my
simplistic C code which writes to the 8 data bits of the parallel port for
anyone interested. these bits can be used to control external circuitry and
spin motors and other neat stuff given a simple interface) If anyone has
some simple Vbasic code which writes to the parallel port I'd like to take a
peek. I'm in a VB class now and want the language to control cool dodads.
If anyone wants, email me off the list.
Have Fun,
Jim
> > Wow I was surfing your site today and put both the Serial Port
> > Complete and Parallel Port Complete from Amazon. Thanks for the link.
> >
> > Is there any preference to using the Serial or Parallel port?
>
> Hi Bill,
>
> I prefer the serial port for simplicity, and the fact that you have
several
> ports to use on most PCs. Jans books will definitely get you started, and
> in the right direction. Most of our serial projects were completed using
> Serial Port Complete as a reference.
>
> I had sent so many people to Amazom.com for this book from my article
> pages that I decided to carry this one in stock.
>
> Regards,
>
> Bruce
> webmaster@r...
> http://www.rentron.com
>
>
>
>
Comments
from MS Visual Basic 6.0?
Original Message
From: "Bill Forgey" <bforgey@r...>
To: <basicstamps@yahoogroups.com>
Sent: Sunday, February 04, 2001 4:56 PM
Subject: [noparse][[/noparse]basicstamps] BS2SX Commands From Visual Basic
> What is the easiest way to send my BS2SX module a command(turn on a led)
> from MS Visual Basic 6.0?
Hi Bill,
We just posted a complete project with VB sample code doing exactly this
at: http://www.rentron.com/sending_data.htm
The Stamp will wait for three (3) bytes of data. After these three bytes of
data are received, it will then either switch the pins to their High or Low
state.
This is just one of a complete series of VB articles for use with the BASIC
Stamp at: http://www.rentron.com/VisualBasic.htm
I also highly recommend Jan Axelsons book "Serial Port Complete". This
book covers many areas of communications with the BASIC Stamp & VB
plus much more.
We have them in stock at: http://www.rentron.com/books.htm , and it's the
best book on the market for getting started with VB serial applications.
Regards,
Bruce Reynolds
webmaster@r...
http://www.rentron.com
Complete and Parallel Port Complete from Amazon. Thanks for the link.
Is there any preference to using the Serial or Parallel port?
--- In basicstamps@y..., "Webmaster@r..." <breyno2@r...> wrote:
>
>
Original Message
> From: "Bill Forgey" <bforgey@r...>
> To: <basicstamps@y...>
> Sent: Sunday, February 04, 2001 4:56 PM
> Subject: [noparse][[/noparse]basicstamps] BS2SX Commands From Visual Basic
>
>
> > What is the easiest way to send my BS2SX module a command(turn on
a led)
> > from MS Visual Basic 6.0?
>
> Hi Bill,
>
> We just posted a complete project with VB sample code doing exactly
this
> at: http://www.rentron.com/sending_data.htm
>
> The Stamp will wait for three (3) bytes of data. After these three
bytes of
> data are received, it will then either switch the pins to their
High or Low state.
>
> This is just one of a complete series of VB articles for use with
the BASIC
> Stamp at: http://www.rentron.com/VisualBasic.htm
>
> I also highly recommend Jan Axelsons book "Serial Port Complete".
This
> book covers many areas of communications with the BASIC Stamp & VB
> plus much more.
>
> We have them in stock at: http://www.rentron.com/books.htm , and
it's the
> best book on the market for getting started with VB serial
applications.
>
> Regards,
>
> Bruce Reynolds
> webmaster@r...
> http://www.rentron.com
Original Message
From: <billforgey@y...>
To: <basicstamps@yahoogroups.com>
Sent: Sunday, February 04, 2001 9:14 PM
Subject: [noparse][[/noparse]basicstamps] Re: BS2SX Commands From Visual Basic
> Wow I was surfing your site today and put both the Serial Port
> Complete and Parallel Port Complete from Amazon. Thanks for the link.
>
> Is there any preference to using the Serial or Parallel port?
Hi Bill,
I prefer the serial port for simplicity, and the fact that you have several
ports to use on most PCs. Jans books will definitely get you started, and
in the right direction. Most of our serial projects were completed using
Serial Port Complete as a reference.
I had sent so many people to Amazom.com for this book from my article
pages that I decided to carry this one in stock.
Regards,
Bruce
webmaster@r...
http://www.rentron.com
writes:
from MS Visual Basic 6.0?
"Easiest" is in the mind of the implementor.... ·That said, take a look at
the StampWorks manual (available for download from www.parallaxinc.com).
There's an experiment that shows how to control LEDs from a terminal (could
just as easily be VB).
-- Jon Williams
-- Dallas, TX[/font]
Stamp. By using a POKE statement in VB you can set the parallel port pins
high or low. Connecting the port pin, probably pin 1, to a Stamp I/O pin you
can signal the Stamp program to run an led display. Parallax STAMPCI has
parallax port interface to do this task. A PEEK statement in VB allows
detection of parallel port pin I/Os. Hope this helps with your project.
Chuck[/font]
read the PC machine ports.
Chuck[/font]
The parallel port is useful if you have several bits that you want to
transmit and enough port pins on the Stamp to spare one for each. The PC's
parallel port has 12 outputs and 5 inputs. But you'll need to use an inpout
DLL (Win9x) or kernel-mode driver (WinNT/2k) to access the ports from VB.
My website's Parallel Port page has links to several options.
The serial port is convenient for sending greater quantities of
information, or any time you don't want to tie up a lot of port pins on the
Stamp. If you add an RS-232 converter at the Stamp end, you can go 80 ft.
or more. The Stamp has serial communication ability built in, though no
buffering. VB includes the MSComm control for serial communications if you
have the Professional or Enterprise edition. If not, use Richard Grier's
free XMComm control. My Serial Ports page has a link.
Jan Axelson
http://www.lvr.com
jan@l...