Pennock's Fiero Forum
  Totally O/T - Archive
  Anyone played with RS232 in VB?

T H I S   I S   A N   A R C H I V E D   T O P I C
  

Email This Page to Someone! | Printable Version


Anyone played with RS232 in VB? by ryan.hess
Started on: 06-04-2006 09:13 PM
Replies: 8
Last post by: ryan.hess on 06-05-2006 10:56 PM
ryan.hess
Member
Posts: 20784
From: Orlando, FL
Registered: Dec 2002


Feedback score: (1)
Leave feedback





Total ratings: 319
Rate this member

Report this Post06-04-2006 09:13 PM Click Here to See the Profile for ryan.hessClick Here to Email ryan.hessSend a Private Message to ryan.hessDirect Link to This Post
ugh... this is sooo confusing.

I just want to make a "terminal" type program, but VB isn't playing nice.
IP: Logged
PFF
System Bot
Boondawg
Member
Posts: 37933
From: Displaced Alaskan
Registered: Jun 2003


Feedback score: N/A
Leave feedback





Total ratings: 337
Rate this member

Report this Post06-04-2006 09:37 PM Click Here to See the Profile for BoondawgClick Here to Email BoondawgSend a Private Message to BoondawgDirect Link to This Post
011010010110.
One is the loneliest number that you'll ever do.
Two, can be as bad as one.
It's the loneliest number since the number one.

IP: Logged
ryan.hess
Member
Posts: 20784
From: Orlando, FL
Registered: Dec 2002


Feedback score: (1)
Leave feedback





Total ratings: 319
Rate this member

Report this Post06-04-2006 09:44 PM Click Here to See the Profile for ryan.hessClick Here to Email ryan.hessSend a Private Message to ryan.hessDirect Link to This Post
01000011 01101111 01101101 01110000 01110101 01110100 01100101 01110010 01110011 00100000 01100001 01110010 01100101 00100000 01100101 01110110 01101001 01101100 00101110

and I MEAN THAT!
IP: Logged
theogre
Member
Posts: 29318
From: USA
Registered: Mar 99


Feedback score: N/A
Leave feedback





Total ratings: 549
Rate this member

Report this Post06-04-2006 11:52 PM Click Here to See the Profile for theogreClick Here to visit theogre's HomePageSend a Private Message to theogreDirect Link to This Post
Understand that Win2K and WinXP do not function correctly on the hardware com ports unless all the signals on the ports are dealt with. This has been a problem for WinALDL and many other programs.

I'm not sure exactly why this happens. To make it more bizar... If you use WinALDL with a USB com port adaptor, it works just fine. It's something in how 32 bit Windows manages the hardware ports on the MoBo.

------------------
Dr. Ian Malcolm: Yeah, but your scientists were so preoccupied with whether or not they could, they didn't stop to think if they should.
(Jurasic Park)

The Ogre's Fiero Cave (It's also at the top of every forum page...)

IP: Logged
Fierobsessed
Member
Posts: 4782
From: Las Vegas, NV
Registered: Dec 2001


Feedback score: N/A
Leave feedback





Total ratings: 147
Rate this member

Report this Post06-05-2006 08:00 AM Click Here to See the Profile for FierobsessedClick Here to Email FierobsessedSend a Private Message to FierobsessedDirect Link to This Post
01001001 00100000 01100001 01100111 01110010 01100101 01100101 00100001
00100000 01010111 01100101 00100000 01110011 01101000 01101111 01110101
01101100 01100100 00100000 01100100 01100101 01110011 01110100 01110010
01101111 01111001 00100000 01110100 01101000 01100101 01101101 00100000
01001001 01101101 01101101 01100101 01100100 01101001 01100001 01110100
01101100 01111001 00101110
IP: Logged
FieroLinks
Member
Posts: 397
From: Spring Hill, FL, USA
Registered: May 2002


Feedback score: N/A
Leave feedback

Rate this member

Report this Post06-05-2006 09:26 AM Click Here to See the Profile for FieroLinksClick Here to visit FieroLinks's HomePageSend a Private Message to FieroLinksDirect Link to This Post
Dont know how you're trying to do it, but....

OnComm event has never worked right for me. I always set up a timer object and check the com port based on the timer. Read all the data from the com port into a buffer, then process the buffer.

-FieroLinks
IP: Logged
ryan.hess
Member
Posts: 20784
From: Orlando, FL
Registered: Dec 2002


Feedback score: (1)
Leave feedback





Total ratings: 319
Rate this member

Report this Post06-05-2006 10:25 AM Click Here to See the Profile for ryan.hessClick Here to Email ryan.hessSend a Private Message to ryan.hessDirect Link to This Post
 
quote
Originally posted by FieroLinks:

Dont know how you're trying to do it, but....

OnComm event has never worked right for me. I always set up a timer object and check the com port based on the timer. Read all the data from the com port into a buffer, then process the buffer.

-FieroLinks


Yeah, for some reason, I got it to work... I had to change Rthreshold to 1, and inputlen to 0. But for some reason, instead of just printing "hello!", it prints hello! with two boxes after it. There were no carriage returns sent or anything. I have no idea what it's doing.
IP: Logged
lou_dias
Member
Posts: 5082
From: Warwick, RI
Registered: Jun 2000


Feedback score: (3)
Leave feedback





Total ratings: 65
Rate this member

Report this Post06-05-2006 01:07 PM Click Here to See the Profile for lou_diasClick Here to Email lou_diasSend a Private Message to lou_diasDirect Link to This Post
Depends how you are printing it. a CR and LF will show up as two boxes in hex editors.

In order for your terminal program to work, you have to connect to something. Preferably something that's Hayes AT compatible.

So if you were using a modem, you'd type ATE1 to turn echo on so you can see what you are typing the ATDT 8005555555 to dial TONE (not pulse) 800-555-5555.

Don't bother with the oncomm event. Just use a timer and keep checking the input buffer and append it to a string... then I do a SPLIT on vbcrlf to get an array of lines... or like I said, append to a string like a queque and process one line at a time...

What type of program are you trying to write? Why re-invent the wheel when Hyperterminal still comes with Windows...

I wrote a program at work in VB.NET that connects to 10 serial ports and checks 1 every 1/10 second for data and processes it.
IP: Logged
ryan.hess
Member
Posts: 20784
From: Orlando, FL
Registered: Dec 2002


Feedback score: (1)
Leave feedback





Total ratings: 319
Rate this member

Report this Post06-05-2006 10:56 PM Click Here to See the Profile for ryan.hessClick Here to Email ryan.hessSend a Private Message to ryan.hessDirect Link to This Post
there should be no carriage return or line feed. I'm working on talking to a microcontroller to update firmware via the serial port.
IP: Logged



All times are ET (US)

T H I S   I S   A N   A R C H I V E D   T O P I C
  

Contact Us | Back To Main Page

Advertizing on PFF | Fiero Parts Vendors
PFF Merchandise | Fiero Gallery | Ogre's Cave
Real-Time Chat | Fiero Related Auctions on eBay



Copyright (c) 1999, C. Pennock