Somewhat OT: Accessing the serialport in VB6?
Archiver
Posts: 46,084
Hello all,
I realize this is not strictly stamp-related, but it has come
up before. I've just started fooling around with Visual Basic and I'm
wondering if anyone would share routines for sending and receiving via the
serial port?
Thanks, Duncan
I realize this is not strictly stamp-related, but it has come
up before. I've just started fooling around with Visual Basic and I'm
wondering if anyone would share routines for sending and receiving via the
serial port?
Thanks, Duncan
Comments
http://www.al-williams.com/stampcom.zip -- which is a frequency counter.
Regards,
Al Williams
AWC
*Floating point math for the Stamp, PIC, SX, or any microcontroller:
http://www.al-williams.com/awce/pak1.htm
>
Original Message
> From: orthner@s... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=uFkODWBRbgxTCfA2Yu2GneqfhA1Q5WvlynD_3FZ57w9LdyEyJIK-WvD6MmssPxxbP27UNJppIAhYfDunIA]orthner@s...[/url
> Sent: Tuesday, July 04, 2000 10:26 AM
> To: basicstamps@egroups.com
> Subject: [noparse][[/noparse]basicstamps] Somewhat OT: Accessing the serialport in VB6?
>
>
>
> Hello all,
> I realize this is not strictly stamp-related, but it has come
> up before. I've just started fooling around with Visual Basic and I'm
> wondering if anyone would share routines for sending and receiving via the
> serial port?
>
> Thanks, Duncan
>
>
>
We have several VB projects for communicating with the
Stamp at: http://www.rentron.com/BasicStamp.htm
Also, look around at Al Williams web site at:
http://www.al-williams.com/awce/index.htm
If you're looking for an excellent book that has plenty of
sample code, I highly recommend the book by Jan Axelson
"Serial Port Complete".
Regards,
Bruce
http://www.rentron.com
webmaster@r...
Original Message
From: <orthner@s...>
To: <basicstamps@egroups.com>
Sent: Tuesday, July 04, 2000 9:25 AM
Subject: [noparse][[/noparse]basicstamps] Somewhat OT: Accessing the serialport in VB6?
|
| Hello all,
| I realize this is not strictly stamp-related, but it has come
| up before. I've just started fooling around with Visual Basic and I'm
| wondering if anyone would share routines for sending and receiving via the
| serial port?
|
| Thanks, Duncan
|
|
|
|
|
orthner@s... writes:
> I realize this is not strictly stamp-related, but it has come
> up before. I've just started fooling around with Visual Basic and I'm
> wondering if anyone would share routines for sending and receiving via the
> serial port?
My "Stamp Applications" article in the July issue of Nuts & Volts magazine
shows how to get data from the Stamp through Visual Basic. The August issue
goes into even more detail.
In the mean time, get Jan Axelson's "Serial Port Complete" (covers VB and
micros, including the Stamp) and Richard Grier's "Visual Basic Programmer's
Guide to Serial Communications." With those two books and a bit of time to
experiment, you'll be set.
-- Jon Williams
-- Dallas, TX
[noparse][[/noparse]snip]
>If you're looking for an excellent book that has plenty of
>sample code, I highly recommend the book by Jan Axelson
>"Serial Port Complete".
I looked at this book and noticed that the routines all use the mscomm
module. This appears to be included only in the VB Pro and Enterprise
editions, not in my Learning Edition (6.0). Am I snookered, or is it just
hiding where I can't find it?
Duncan
orthner@s... writes:
> I looked at this book and noticed that the routines all use the mscomm
> module. This appears to be included only in the VB Pro and Enterprise
> editions, not in my Learning Edition (6.0). Am I snookered, or is it just
> hiding where I can't find it?
You can get the XMComm control from Richard Grier. It's free and was built
using the MSComm control, so you have all of MSComm's capabilities.
http://ourworld.compuserve.com/homepages/richard_grier
>
>You can get the XMComm control from Richard Grier. It's free and was built
>using the MSComm control, so you have all of MSComm's capabilities.
>
>http://ourworld.compuserve.com/homepages/richard_grier
This is really great! Thanks so much Jon and Bruce. This was becoming a
major stumbling block and if I'd known the Learning Edition was so limited
I wouldn't have gotten it (But Visual Basic *is* really neat). I won't
burden the list with this any further...
Thanks again, Duncan
>
> Hello all,
> I realize this is not strictly stamp-related, but it
has come
> up before. I've just started fooling around with Visual Basic and
I'm
> wondering if anyone would share routines for sending and receiving
via the
> serial port?
>
> Thanks, Duncan
I have just found your message by accident as I am searching about
the
subject of serial communiation. Here is an example where I send
command to PIC microcontroller using VB5 on COM1
Private Sub Command2_Click()
MSComm1.Output = "setPA0" + Chr(13)
End Sub
Private Sub Command4_Click()
MSComm1.Output = "RESPA0" + Chr(13)
End Sub
Private Sub Command5_Click()
MSComm2.Output = "C00" + Chr(13) + Chr(10)
End Sub
Private Sub Command6_Click()
MSComm2.Output = "C02" + Chr(13) + Chr(10)
End Sub
Private Sub Option1_Click(Index As Integer)
'enable port
MSComm2.PortOpen = True
End Sub
Private Sub Option2_Click()
MSComm1.PortOpen = False
End Sub
Private Sub Option3_Click()
MSComm2.PortOpen = True
End Sub
Private Sub Option4_Click()
MSComm2.PortOpen = False
End Sub