Serial Data from stamp(rev 1)
Archiver
Posts: 46,084
In the debug mode I have to toggle the dtr Line to get my led to flash,,
??
When I run it just by turning on the power I get one blink and that's
it
'{$STAMP BS2}
'{$PORT COM1}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
PULSOUT 0,5000 'My Led blinking
idx = idx + 1
PAUSE 200
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nKWZXqWMGtlBq851XIojqi2PKvRCS-6Nz_jIDSEtTBUdZFgZmqkvwqOuGHkvow_Zac3Y-sCDoR5kCJ8]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:15 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I NEED TO HOOK AN LED TO PORT0 TO SEE THE Polls im still not getting
anything from my stamp in my vb program it is setup For COM1 in my
program
In VB. I wanna blink an LED every poll
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=h3aUM2bcP0JaCILQXpIB8HCkDOSvkNeqhEwv009o384s6p-h3BIQNZzhWNQbbMjduCNWiMv8L3STi0R0cD1Htw]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 2:08 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
If you run the program in your BASIC Stamp editor it will open a DEBUG
window and you'll see the data -- yes, ASCII strings. Now, close the
BASIC Stamp editor (which will free the programming comm port) and run
your VB program selecting the comm port you use for programming. The
baud rate will be 9600.
It will be up to your VB program to parse and process the data.
The example below was not intended to be THE answer, just something to
get you started. Now that you can see how the "simulator" is done, you
can adjust any way you choose.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nKWZXqWMGtlBq851XIojqi2PKvRCS-6Nz_jIDSEtTBUdZFgZmqkvwqOuGHkvow_Zac3Y-sCDoR5kCJ8]subrian@m...[/url
Sent: Thursday, December 18, 2003 1:35 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I need it to change the 0001 field also
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=h3aUM2bcP0JaCILQXpIB8HCkDOSvkNeqhEwv009o384s6p-h3BIQNZzhWNQbbMjduCNWiMv8L3STi0R0cD1Htw]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nKWZXqWMGtlBq851XIojqi2PKvRCS-6Nz_jIDSEtTBUdZFgZmqkvwqOuGHkvow_Zac3Y-sCDoR5kCJ8]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
??
When I run it just by turning on the power I get one blink and that's
it
'{$STAMP BS2}
'{$PORT COM1}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
PULSOUT 0,5000 'My Led blinking
idx = idx + 1
PAUSE 200
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nKWZXqWMGtlBq851XIojqi2PKvRCS-6Nz_jIDSEtTBUdZFgZmqkvwqOuGHkvow_Zac3Y-sCDoR5kCJ8]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:15 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I NEED TO HOOK AN LED TO PORT0 TO SEE THE Polls im still not getting
anything from my stamp in my vb program it is setup For COM1 in my
program
In VB. I wanna blink an LED every poll
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=h3aUM2bcP0JaCILQXpIB8HCkDOSvkNeqhEwv009o384s6p-h3BIQNZzhWNQbbMjduCNWiMv8L3STi0R0cD1Htw]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 2:08 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
If you run the program in your BASIC Stamp editor it will open a DEBUG
window and you'll see the data -- yes, ASCII strings. Now, close the
BASIC Stamp editor (which will free the programming comm port) and run
your VB program selecting the comm port you use for programming. The
baud rate will be 9600.
It will be up to your VB program to parse and process the data.
The example below was not intended to be THE answer, just something to
get you started. Now that you can see how the "simulator" is done, you
can adjust any way you choose.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nKWZXqWMGtlBq851XIojqi2PKvRCS-6Nz_jIDSEtTBUdZFgZmqkvwqOuGHkvow_Zac3Y-sCDoR5kCJ8]subrian@m...[/url
Sent: Thursday, December 18, 2003 1:35 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I need it to change the 0001 field also
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=h3aUM2bcP0JaCILQXpIB8HCkDOSvkNeqhEwv009o384s6p-h3BIQNZzhWNQbbMjduCNWiMv8L3STi0R0cD1Htw]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=nKWZXqWMGtlBq851XIojqi2PKvRCS-6Nz_jIDSEtTBUdZFgZmqkvwqOuGHkvow_Zac3Y-sCDoR5kCJ8]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Comments
every 3 seconds in VB to Toggle data Coming into VB
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=j_SupX07FCxLYEM0WEkR9EI5BRAy6Yxam36PLhecNvNGH9tydQUeD53AJ4jFnaMbV469rIiH3W-oiRsR]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:42 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
In the debug mode I have to toggle the dtr Line to get my led to flash,,
??
When I run it just by turning on the power I get one blink and that's
it
'{$STAMP BS2}
'{$PORT COM1}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
PULSOUT 0,5000 'My Led blinking
idx = idx + 1
PAUSE 200
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=j_SupX07FCxLYEM0WEkR9EI5BRAy6Yxam36PLhecNvNGH9tydQUeD53AJ4jFnaMbV469rIiH3W-oiRsR]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:15 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I NEED TO HOOK AN LED TO PORT0 TO SEE THE Polls im still not getting
anything from my stamp in my vb program it is setup For COM1 in my
program
In VB. I wanna blink an LED every poll
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Kda0u32RiGhRhVaOQkvpSkWf4vfHGoNwcq_kRV9oR-kRb06GZQzy0tsYO9kgo9qudAdUMzrknOn1s6GFpIe7t5o]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 2:08 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
If you run the program in your BASIC Stamp editor it will open a DEBUG
window and you'll see the data -- yes, ASCII strings. Now, close the
BASIC Stamp editor (which will free the programming comm port) and run
your VB program selecting the comm port you use for programming. The
baud rate will be 9600.
It will be up to your VB program to parse and process the data.
The example below was not intended to be THE answer, just something to
get you started. Now that you can see how the "simulator" is done, you
can adjust any way you choose.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=j_SupX07FCxLYEM0WEkR9EI5BRAy6Yxam36PLhecNvNGH9tydQUeD53AJ4jFnaMbV469rIiH3W-oiRsR]subrian@m...[/url
Sent: Thursday, December 18, 2003 1:35 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I need it to change the 0001 field also
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Kda0u32RiGhRhVaOQkvpSkWf4vfHGoNwcq_kRV9oR-kRb06GZQzy0tsYO9kgo9qudAdUMzrknOn1s6GFpIe7t5o]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=j_SupX07FCxLYEM0WEkR9EI5BRAy6Yxam36PLhecNvNGH9tydQUeD53AJ4jFnaMbV469rIiH3W-oiRsR]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
DTR transistion Can u help ?? Code has (1) form (1) timer and (1)Label
Private Sub Form_Load()
'Set the port number
MSComm1.CommPort = 1
' Other settings
MSComm1.Settings = "9600,n,8,1"
MSComm1.InBufferSize = 1024
MSComm1.OutBufferSize = 1024
MSComm1.RThreshold = 40
MSComm1.SThreshold = 5
MSComm1.InputLen = 40
'MSComm1.ParityReplace = "?"
MSComm1.RTSEnable = True
MSComm1.DTREnable = True
MSComm1.NullDiscard = False
MSComm1.Handshaking = comNone
' Open the port
MSComm1.PortOpen = True
End Sub
Private Sub MSComm1_OnComm()
' variable to store fetched data
Static strData As String
With MSComm1
Select Case .CommEvent
Case comEventBreak
MsgBox "Error", "1comEventBreak"
Case comEventFrame
MsgBox "Error", "1comEventFrame"
Case comEventOverrun
MsgBox "Error", "1comEventOverrun"
Case comEventRxOver
MsgBox "Error", "1comEventRxOver"
Case comEventRxParity
MsgBox "Error", "1comEventRxParity"
Case comEventTxFull
MsgBox "Error", "1comEventTxFull"
Case comEventDCB
MsgBox "Error", "1comEventDCB"
Case comEvReceive
' store fetched data in the variable
strData = strData & MSComm1.Input + vbCrLf
Label1.Caption = strData
testStr = strData
MSComm1.Output = vbCrLf
' reinitialze strData for next fetch
' Node1 = Left(strData, 4)
' Label2.Caption = Node1
' Split serial Data into an array
'testarray = SplitMod(testStr, ",", "'")
' If testarray(0) = "0001" Then N = N + 1
' Label3.Caption = testarray(0)
' Label4.Caption = testarray(1)
' Label5.Caption = testarray(2)
'Label6.Caption = testarray(3)
'Label7.Caption = testarray(4)
' Label8.Caption = testarray(5)
' Label9.Caption = testarray(6)
' Label8.Caption = testarray(5)
' Label9.Caption = testarray(6)
' Label10.Caption = testarray(7)
'--- write array to a text File
' Open "C:/Data.txt" For Append As #1
' Write #1, testarray(1) & " " & testarray(2) & " " &
testarray(3) & " " & " " & testarray(4)
' Close #1
' Label11.Caption = N
strData = ""
End Select
End With
End Sub
Private Sub Timer1_Timer()
If MSComm1.DTREnable = True Then
MSComm1.DTREnable = False
Else
MSComm1.DTREnable = True
End If
End Sub
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=o6fy_CHi4qg8zLgHkvqplKoqCZ81Y67pt27n8mc5mhtiDGjeuQPZh5Z2lc7BQXZ4pFvwkz7L5iO4lw]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:51 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
o.k I got the DTR problem Fixed all I need to do is Drop the DTR Line
every 3 seconds in VB to Toggle data Coming into VB
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=o6fy_CHi4qg8zLgHkvqplKoqCZ81Y67pt27n8mc5mhtiDGjeuQPZh5Z2lc7BQXZ4pFvwkz7L5iO4lw]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:42 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
In the debug mode I have to toggle the dtr Line to get my led to flash,,
??
When I run it just by turning on the power I get one blink and that's
it
'{$STAMP BS2}
'{$PORT COM1}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
PULSOUT 0,5000 'My Led blinking
idx = idx + 1
PAUSE 200
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=o6fy_CHi4qg8zLgHkvqplKoqCZ81Y67pt27n8mc5mhtiDGjeuQPZh5Z2lc7BQXZ4pFvwkz7L5iO4lw]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:15 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I NEED TO HOOK AN LED TO PORT0 TO SEE THE Polls im still not getting
anything from my stamp in my vb program it is setup For COM1 in my
program
In VB. I wanna blink an LED every poll
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=tSHUqIQ2lS7RA3hCOEGJFT1HD9qjkzOVn8pyoTvj6WVY9uYX8bx16shU9R36TyTIvNkrawDXSvLDOWpReEZ49-M]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 2:08 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
If you run the program in your BASIC Stamp editor it will open a DEBUG
window and you'll see the data -- yes, ASCII strings. Now, close the
BASIC Stamp editor (which will free the programming comm port) and run
your VB program selecting the comm port you use for programming. The
baud rate will be 9600.
It will be up to your VB program to parse and process the data.
The example below was not intended to be THE answer, just something to
get you started. Now that you can see how the "simulator" is done, you
can adjust any way you choose.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=o6fy_CHi4qg8zLgHkvqplKoqCZ81Y67pt27n8mc5mhtiDGjeuQPZh5Z2lc7BQXZ4pFvwkz7L5iO4lw]subrian@m...[/url
Sent: Thursday, December 18, 2003 1:35 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I need it to change the 0001 field also
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=tSHUqIQ2lS7RA3hCOEGJFT1HD9qjkzOVn8pyoTvj6WVY9uYX8bx16shU9R36TyTIvNkrawDXSvLDOWpReEZ49-M]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=o6fy_CHi4qg8zLgHkvqplKoqCZ81Y67pt27n8mc5mhtiDGjeuQPZh5Z2lc7BQXZ4pFvwkz7L5iO4lw]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
said, you may find the following Nuts & Volts article useful:
http://www.parallax.com/dl/docs/cols/nv/vol3/col/89.pdf
You can download VB code for the article from the Parallax web site.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pg05R_TrBnfTUdTQpBl6GopQOh2yPbEFtqTxHm0F1NiTxnGciKuTrB1d7RmLkoMIkM3taOMrzfdi]subrian@m...[/url
Sent: Thursday, December 18, 2003 3:17 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
Here is my VBcode but my Label1.caption is moving Down the form on every
DTR transistion Can u help ?? Code has (1) form (1) timer and (1)Label
Private Sub Form_Load()
'Set the port number
MSComm1.CommPort = 1
' Other settings
MSComm1.Settings = "9600,n,8,1"
MSComm1.InBufferSize = 1024
MSComm1.OutBufferSize = 1024
MSComm1.RThreshold = 40
MSComm1.SThreshold = 5
MSComm1.InputLen = 40
'MSComm1.ParityReplace = "?"
MSComm1.RTSEnable = True
MSComm1.DTREnable = True
MSComm1.NullDiscard = False
MSComm1.Handshaking = comNone
' Open the port
MSComm1.PortOpen = True
End Sub
Private Sub MSComm1_OnComm()
' variable to store fetched data
Static strData As String
With MSComm1
Select Case .CommEvent
Case comEventBreak
MsgBox "Error", "1comEventBreak"
Case comEventFrame
MsgBox "Error", "1comEventFrame"
Case comEventOverrun
MsgBox "Error", "1comEventOverrun"
Case comEventRxOver
MsgBox "Error", "1comEventRxOver"
Case comEventRxParity
MsgBox "Error", "1comEventRxParity"
Case comEventTxFull
MsgBox "Error", "1comEventTxFull"
Case comEventDCB
MsgBox "Error", "1comEventDCB"
Case comEvReceive
' store fetched data in the variable
strData = strData & MSComm1.Input + vbCrLf
Label1.Caption = strData
testStr = strData
MSComm1.Output = vbCrLf
' reinitialze strData for next fetch
' Node1 = Left(strData, 4)
' Label2.Caption = Node1
' Split serial Data into an array
'testarray = SplitMod(testStr, ",", "'")
' If testarray(0) = "0001" Then N = N + 1
' Label3.Caption = testarray(0)
' Label4.Caption = testarray(1)
' Label5.Caption = testarray(2)
'Label6.Caption = testarray(3)
'Label7.Caption = testarray(4)
' Label8.Caption = testarray(5)
' Label9.Caption = testarray(6)
' Label8.Caption = testarray(5)
' Label9.Caption = testarray(6)
' Label10.Caption = testarray(7)
'--- write array to a text File
' Open "C:/Data.txt" For Append As #1
' Write #1, testarray(1) & " " & testarray(2) & " " &
testarray(3) & " " & " " & testarray(4)
' Close #1
' Label11.Caption = N
strData = ""
End Select
End With
End Sub
Private Sub Timer1_Timer()
If MSComm1.DTREnable = True Then
MSComm1.DTREnable = False
Else
MSComm1.DTREnable = True
End If
End Sub
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pg05R_TrBnfTUdTQpBl6GopQOh2yPbEFtqTxHm0F1NiTxnGciKuTrB1d7RmLkoMIkM3taOMrzfdi]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:51 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
o.k I got the DTR problem Fixed all I need to do is Drop the DTR Line
every 3 seconds in VB to Toggle data Coming into VB
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pg05R_TrBnfTUdTQpBl6GopQOh2yPbEFtqTxHm0F1NiTxnGciKuTrB1d7RmLkoMIkM3taOMrzfdi]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:42 PM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
In the debug mode I have to toggle the dtr Line to get my led to flash,,
??
When I run it just by turning on the power I get one blink and that's
it
'{$STAMP BS2}
'{$PORT COM1}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
PULSOUT 0,5000 'My Led blinking
idx = idx + 1
PAUSE 200
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pg05R_TrBnfTUdTQpBl6GopQOh2yPbEFtqTxHm0F1NiTxnGciKuTrB1d7RmLkoMIkM3taOMrzfdi]subrian@m...[/url
Sent: Thursday, December 18, 2003 2:15 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I NEED TO HOOK AN LED TO PORT0 TO SEE THE Polls im still not getting
anything from my stamp in my vb program it is setup For COM1 in my
program
In VB. I wanna blink an LED every poll
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=b94NJ3auTE1YtOggiiXslO4Vhp--3kS2tKv6VPPtR1fYARtwak-wjqokP-H6EhNboEHHZyT2-_UdV6cnX0SaN6o]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 2:08 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
If you run the program in your BASIC Stamp editor it will open a DEBUG
window and you'll see the data -- yes, ASCII strings. Now, close the
BASIC Stamp editor (which will free the programming comm port) and run
your VB program selecting the comm port you use for programming. The
baud rate will be 9600.
It will be up to your VB program to parse and process the data.
The example below was not intended to be THE answer, just something to
get you started. Now that you can see how the "simulator" is done, you
can adjust any way you choose.
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pg05R_TrBnfTUdTQpBl6GopQOh2yPbEFtqTxHm0F1NiTxnGciKuTrB1d7RmLkoMIkM3taOMrzfdi]subrian@m...[/url
Sent: Thursday, December 18, 2003 1:35 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
I need it to change the 0001 field also
Original Message
From: Jon Williams [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=b94NJ3auTE1YtOggiiXslO4Vhp--3kS2tKv6VPPtR1fYARtwak-wjqokP-H6EhNboEHHZyT2-_UdV6cnX0SaN6o]jwilliams@p...[/url
Sent: Thursday, December 18, 2003 8:55 AM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
Do you care about baud rate? If your PC program will work with the
Stamp's DEBUG output (9600 baud) then you can use this as-is, otherwise
change it to SEROUT (on pin 16 if you want to use the programming port)
for the baud you need.
In your example the only fields that changed were the index and the
third so this little demo does that (using RANDOM to change field 3).
' {$STAMP BS2}
' $PBASIC 2.5}
idx VAR Word
field3 VAR Word
Setup:
idx = 1
Main:
DO
RANDOM field3
field3 = field3 // 10 + 90
DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-095,04.3,1,014,015",
CR
idx = idx + 1
PAUSE 2000
LOOP
END
Original Message
From: Brian E Boothe [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=pg05R_TrBnfTUdTQpBl6GopQOh2yPbEFtqTxHm0F1NiTxnGciKuTrB1d7RmLkoMIkM3taOMrzfdi]subrian@m...[/url
Sent: Thursday, December 18, 2003 8:27 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
I Need the basic stamp the Input into my Serial port on my PC the
following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
{Then a Pause For 2 Seconds}
0003,+032,12.1,-092,-091,04.3,1,014,015
{Then a Pause For 2 Seconds}
0004,+032,12.1,-098,-097,04.3,1,014,015
0005,+032,12.1,-095,-099,04.3,1,014,015
0006,+032,12.1,-091,-092,04.3,1,014,015
0007,+032,12.1,-099,-090,04.3,1,014,015
.
. ect ect
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject
and Body of the message will be ignored.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/basicstamps/
To unsubscribe from this group, send an email to:
basicstamps-unsubscribe@yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
This message has been scanned by WebShield. Please report SPAM to
abuse@p....
1. The BOE uses the DTR line as a 'RESET' for the BS2.
When you set DTREnable 'TRUE', you are resetting the
BS2. If you don't want to reset the BS2, set DTREnable
to 'false'.
2. I always use SEROUT 16, BaudRate, [noparse][[/noparse]"MyData"]
to send debug data to the serial port. I don't want
to depend on the 'DEBUG' keyword to do anything
other than DEBUG messages.
3. When you send "vbCRLF" out to the BS2, it is
immediately being echoed back to you by the BS2.
That's how the BS2 232 receive circuit works.
So you need to toss the first 'CR' 'LF' chars that
come back to your VB program.
--- In basicstamps@yahoogroups.com, "Brian E Boothe" <subrian@m...>
wrote:
> Here is my VBcode but my Label1.caption is moving Down the form on
every
> DTR transistion Can u help ?? Code has (1) form (1) timer and (1)
Label
>
>
> Private Sub Form_Load()
> 'Set the port number
>
> MSComm1.CommPort = 1
>
> ' Other settings
>
> MSComm1.Settings = "9600,n,8,1"
> MSComm1.InBufferSize = 1024
> MSComm1.OutBufferSize = 1024
> MSComm1.RThreshold = 40
> MSComm1.SThreshold = 5
> MSComm1.InputLen = 40
> 'MSComm1.ParityReplace = "?"
> MSComm1.RTSEnable = True
> MSComm1.DTREnable = True
> MSComm1.NullDiscard = False
> MSComm1.Handshaking = comNone
>
> ' Open the port
>
> MSComm1.PortOpen = True
>
>
> End Sub
>
> Private Sub MSComm1_OnComm()
>
> ' variable to store fetched data
>
> Static strData As String
>
> With MSComm1
> Select Case .CommEvent
> Case comEventBreak
> MsgBox "Error", "1comEventBreak"
> Case comEventFrame
> MsgBox "Error", "1comEventFrame"
> Case comEventOverrun
> MsgBox "Error", "1comEventOverrun"
> Case comEventRxOver
> MsgBox "Error", "1comEventRxOver"
> Case comEventRxParity
> MsgBox "Error", "1comEventRxParity"
> Case comEventTxFull
> MsgBox "Error", "1comEventTxFull"
> Case comEventDCB
> MsgBox "Error", "1comEventDCB"
> Case comEvReceive
>
> ' store fetched data in the variable
> strData = strData & MSComm1.Input + vbCrLf
> Label1.Caption = strData
> testStr = strData
> MSComm1.Output = vbCrLf
> ' reinitialze strData for next fetch
> ' Node1 = Left(strData, 4)
> ' Label2.Caption = Node1
> ' Split serial Data into an array
> 'testarray = SplitMod(testStr, ",", "'")
> ' If testarray(0) = "0001" Then N = N + 1
>
> ' Label3.Caption = testarray(0)
> ' Label4.Caption = testarray(1)
> ' Label5.Caption = testarray(2)
> 'Label6.Caption = testarray(3)
> 'Label7.Caption = testarray(4)
> ' Label8.Caption = testarray(5)
> ' Label9.Caption = testarray(6)
> ' Label8.Caption = testarray(5)
> ' Label9.Caption = testarray(6)
> ' Label10.Caption = testarray(7)
> '--- write array to a text File
> ' Open "C:/Data.txt" For Append As #1
> ' Write #1, testarray(1) & " " & testarray(2) & " " &
> testarray(3) & " " & " " & testarray(4)
>
> ' Close #1
> ' Label11.Caption = N
>
> strData = ""
>
> End Select
>
> End With
>
> End Sub
>
> Private Sub Timer1_Timer()
> If MSComm1.DTREnable = True Then
> MSComm1.DTREnable = False
> Else
> MSComm1.DTREnable = True
> End If
>
>
> End Sub
>
Original Message
> From: Brian E Boothe [noparse][[/noparse]mailto:subrian@m...]
> Sent: Thursday, December 18, 2003 2:51 PM
> To: basicstamps@yahoogroups.com
> Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
>
> o.k I got the DTR problem Fixed all I need to do is Drop the DTR
Line
> every 3 seconds in VB to Toggle data Coming into VB
>
>
>
Original Message
> From: Brian E Boothe [noparse][[/noparse]mailto:subrian@m...]
> Sent: Thursday, December 18, 2003 2:42 PM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp(rev 1)
>
> In the debug mode I have to toggle the dtr Line to get my led to
flash,,
> ??
> When I run it just by turning on the power I get one blink and
that's
> it
>
>
>
> '{$STAMP BS2}
> '{$PORT COM1}
> ' $PBASIC 2.5}
>
> idx VAR Word
> field3 VAR Word
>
> Setup:
> idx = 1
>
> Main:
> DO
> RANDOM field3
> field3 = field3 // 10 + 90
> DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-
095,04.3,1,014,015",
> CR
> PULSOUT 0,5000 'My Led blinking
> idx = idx + 1
> PAUSE 200
> LOOP
>
> END
>
>
Original Message
> From: Brian E Boothe [noparse][[/noparse]mailto:subrian@m...]
> Sent: Thursday, December 18, 2003 2:15 PM
> To: basicstamps@yahoogroups.com
> Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
>
> I NEED TO HOOK AN LED TO PORT0 TO SEE THE Polls im still not getting
> anything from my stamp in my vb program it is setup For COM1 in my
> program
> In VB. I wanna blink an LED every poll
>
>
Original Message
> From: Jon Williams [noparse][[/noparse]mailto:jwilliams@p...]
> Sent: Thursday, December 18, 2003 2:08 PM
> To: basicstamps@yahoogroups.com
> Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
>
> If you run the program in your BASIC Stamp editor it will open a
DEBUG
> window and you'll see the data -- yes, ASCII strings. Now, close
the
> BASIC Stamp editor (which will free the programming comm port) and
run
> your VB program selecting the comm port you use for programming.
The
> baud rate will be 9600.
>
> It will be up to your VB program to parse and process the data.
>
> The example below was not intended to be THE answer, just something
to
> get you started. Now that you can see how the "simulator" is done,
you
> can adjust any way you choose.
>
> -- Jon Williams
> -- Applications Engineer, Parallax
> -- Dallas Office
>
>
>
Original Message
> From: Brian E Boothe [noparse][[/noparse]mailto:subrian@m...]
> Sent: Thursday, December 18, 2003 1:35 PM
> To: basicstamps@yahoogroups.com
> Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
>
>
> I need it to change the 0001 field also
>
>
Original Message
> From: Jon Williams [noparse][[/noparse]mailto:jwilliams@p...]
> Sent: Thursday, December 18, 2003 8:55 AM
> To: basicstamps@yahoogroups.com
> Subject: RE: [noparse][[/noparse]basicstamps] Serial Data from stamp
>
> Do you care about baud rate? If your PC program will work with the
> Stamp's DEBUG output (9600 baud) then you can use this as-is,
otherwise
> change it to SEROUT (on pin 16 if you want to use the programming
port)
> for the baud you need.
>
> In your example the only fields that changed were the index and the
> third so this little demo does that (using RANDOM to change field
3).
>
> ' {$STAMP BS2}
> ' $PBASIC 2.5}
>
> idx VAR Word
> field3 VAR Word
>
> Setup:
> idx = 1
>
> Main:
> DO
> RANDOM field3
> field3 = field3 // 10 + 90
> DEBUG DEC4 idx, ",+032,12.1,-", DEC3 field3, ",-
095,04.3,1,014,015",
> CR
> idx = idx + 1
> PAUSE 2000
> LOOP
>
> END
>
>
>
>
>
Original Message
> From: Brian E Boothe [noparse][[/noparse]mailto:subrian@m...]
> Sent: Thursday, December 18, 2003 8:27 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Serial Data from stamp
>
>
>
> I Need the basic stamp the Input into my Serial port on my PC the
> following String, 0001,+032,12.1,-093,-095,04.3,1,014,015
> {Then a Pause For 2 Seconds}
> 0003,+032,12.1,-092,-091,04.3,1,014,015
> {Then a Pause For 2 Seconds}
> 0004,+032,12.1,-098,-097,04.3,1,014,015
> 0005,+032,12.1,-095,-099,04.3,1,014,015
> 0006,+032,12.1,-091,-092,04.3,1,014,015
> 0007,+032,12.1,-099,-090,04.3,1,014,015
> .
> . ect ect
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p...
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
>
> This message has been scanned by WebShield. Please report SPAM to
> abuse@p...
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
Subject
> and Body of the message will be ignored.
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/basicstamps/
>
> To unsubscribe from this group, send an email to:
> basicstamps-unsubscribe@yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/