Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to do VB6 and serial ports abow COM16

Status
Not open for further replies.

aslm

Advanced Member level 4
Joined
May 3, 2002
Messages
119
Helped
7
Reputation
14
Reaction score
2
Trophy points
1,298
Activity points
1,500
Im now using mscomm in a VB6 project but as I understand this component does not support ports abow com16. If USB BT, IR and serial dongles is used ports easily starts getting numbers abow 16.

What is the fix or solution to this problem?

If there is no solutions for mscomm suggestions to other components with a word about own experience would be great, comersial or free.

re Me
 

Hi aslm, sorry but this is a question against your question. actually i'm trying damn hard to transmit 4-bytes from 89c51 mc to pc, using vb. i made a small program in vb using mscomm. but my problem is the data dosen't transfers in order, sometimes the program reads 1st byte first
sometimes 2nd byte first. i'm doing only one-way communication, should i use 2-way communication. i would be very thankful to you if you could send me a sample vb program,

Thanks once again,

with best Regards,
amit.
 

This does realy not belong here, next time ask in a separate thread to get an answer...

But, its not that hard att all, search the net and you will find more examples than you can read...

To get it going, create a mscomm object, set it up:

With Me.MSComm
If .PortOpen = True Then .PortOpen = False
.CommPort = 1
.InBufferSize = 1024
.Settings = "115200,N,8,1"
.InputMode = comInputModeText
.InputLen = 0
.RThreshold = 0
.PortOpen = True
End With

And then use a timer to to emty the inbuffer periodicaly. The input event you can get when setting RThreshold to something different then 0 can give you problems so dont use that (is my experience at least)...

Any one with some ansvers to the original question?

re Me
 

I think you can change the COM16 device to a COM3 by simply reassigning device resources to the hardware from the device manager.

Or if that doesn't work too well. Try using the CreateFile Win32 API instead of the MSComm control.

- Jayson

aslm said:
Im now using mscomm in a VB6 project but as I understand this component does not support ports abow com16. If USB BT, IR and serial dongles is used ports easily starts getting numbers abow 16.

What is the fix or solution to this problem?

If there is no solutions for mscomm suggestions to other components with a word about own experience would be great, comersial or free.

re Me
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top