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.

Best language to access serial port?

Status
Not open for further replies.

PlatinumT

Member level 3
Joined
Sep 15, 2002
Messages
58
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Location
Arkansas
Activity points
407
access serial port using inpout32.dll vb6

What is the best language to write windows programs to access the serial port? I have a little experience with C/C++.
 

eda4you

Full Member level 5
Joined
Sep 17, 2002
Messages
256
Helped
24
Reputation
48
Reaction score
11
Trophy points
1,298
Activity points
2,325
best language serial port

PlatinumT said:
What is the best language to write windows programs to access the serial port? I have a little experience with C/C++.

Almost every language supports communications via serial. Search in the internet, there are a lot of usefull tips.

In C it can be simple done if you use interrupts and assembler.
 

ali

Member level 2
Joined
Feb 16, 2003
Messages
43
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,288
Activity points
454
Dear all
you can use every languge(or compiler) that support windows programming such as Delphi ,VC ,VB or Jave C Bulider ,J Bulider and .....
but as ahmet2004 said if you choose Delphi or C Bulider you cand find alot of free components that simplify your task
Bye.
 

cbsirio

Member level 3
Joined
Jan 5, 2003
Messages
64
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
721
Hi Ali,
I use Delphi with TComport

https://sourceforge.net/projects/comport/

wich is freeware for all use. I have several projects with it and I can assure that is very simple to use. You have to forget interrupt, i/o, or something else, just concentrate yourself to the protocol you have to implement.

HTH, Sirio.
 

cbsirio

Member level 3
Joined
Jan 5, 2003
Messages
64
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
721
Sorry, :?
I forgot to say that TComport is also compatible with C++ Builder and it comes with some examples of use!

bye!

Sirio.
 

griffkalgo

Newbie level 3
Joined
Sep 17, 2004
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
36
Hi,

There are a loot of Dll sources in C that will do the trick and provide a generic interface for C,C++,VB, PASCAL, embedded design, etc.

Do a google on "Serial+Dll+source" and you'll come up with a lot of info!
 

djalli

Advanced Member level 3
Joined
Nov 10, 2001
Messages
825
Helped
31
Reputation
62
Reaction score
15
Trophy points
1,298
Location
1600 Pennsylvania Avenue, Washington DC 20500
Activity points
8,288
PlatinumT said:
What is the best language to write windows programs to access the serial port? I have a little experience with C/C++.

You can use assembly if you like. Actually if you are crazy enough.

You want my opinion since you asked this question openly.

C or C++ is most common one. You can be cheap an rely on VBRUNxxxx.dll and use serial.OCX (used to be called *.VBX) to do the same thing.

You choose.
 

dibl01

Member level 1
Joined
Jul 11, 2002
Messages
40
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
365
PlatinumT said:
What is the best language to write windows programs to access the serial port? I have a little experience with C/C++.

MATLAB has extensive support for serial port interface, including nice debugging feature.
 

svicent

Full Member level 6
Joined
Jul 11, 2001
Messages
322
Helped
33
Reputation
64
Reaction score
7
Trophy points
1,298
Activity points
2,293
I use LabVIEW. With LabVIEW you don't need to search any DLL.
 

SPATAN

Full Member level 2
Joined
Aug 17, 2004
Messages
135
Helped
8
Reputation
16
Reaction score
3
Trophy points
1,298
Activity points
1,021
VB is very easy for me.
I used in my projects.
 

haulm

Advanced Member level 4
Joined
Feb 26, 2002
Messages
106
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,298
Activity points
427
Use Delphi components is an easy way.
 

tcsa35

Full Member level 3
Joined
Mar 19, 2002
Messages
171
Helped
10
Reputation
20
Reaction score
8
Trophy points
1,298
Activity points
1,507
Hi

You can use VC++

The file input and output (I/O) functions (CreateFile, CloseHandle, ReadFile, ReadFileEx, WriteFile, and WriteFileEx) provide the basic interface for opening and closing a communications resource handle and for performing read and write operations. The Microsoft® Win32® API also includes a set of communications functions that provide access to communications resources. This overview describes the use of file I/O and communications functions.



Enjoy
 

mandrei

Member level 3
Joined
Jan 10, 2004
Messages
64
Helped
2
Reputation
4
Reaction score
0
Trophy points
1,286
Activity points
889
Learnning to programm the serial port is not a simple task, therefore depending on yours goals U can use those advices:

If U like to be an amator use VB, DOS (it's simple)

If you are a job hunter for today : use C C++

If you are a job hunter for today and tomorow use Java, C#
 

Visser

Newbie level 3
Joined
Sep 23, 2004
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
35
Does someone know how to do this in Java? Maybe a link with example programs....
Thanx.
 

Sherif zakaria

Newbie level 6
Joined
Sep 30, 2004
Messages
12
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
152
i use in the last project with MATLAB , it is very easy and simple , but may be u face some problem to optimaize the speed of it..
 

mexx

Member level 2
Joined
Dec 2, 2003
Messages
49
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
550
i think visual basic is the easiest language to control your serial port...its too simple...u can do anything in mscomm environment
 

asrafiel

Newbie level 3
Joined
Oct 8, 2004
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
34
C is the best. Simple. Seek outportb function and your program will be done.
 

Wind of Darkness

Newbie level 6
Joined
Jul 1, 2004
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
40
asrafiel said:
C is the best. Simple. Seek outportb function and your program will be done.

outportb can use in dos and old windows but it can't use in windows xp and nt
 

sinatra

Full Member level 4
Joined
Mar 29, 2002
Messages
214
Helped
18
Reputation
36
Reaction score
7
Trophy points
1,298
Location
Neverland
Activity points
2,842
Hello all.
For the ones who would like to use a dll to access a hardware port.
The best dll available now, that doesn't need any installation or copy of files etc... is:
https://www.logix4u.net/inpout32.htm

But for a beginer I would advise to use MSComm.
It is accessible from visual basic and visual c. You will find everything about it in MSDN help (help from visual studio).

For the ones who are using visual basic, it is worth to take a look in the book:
"serial port complete", there are many programs available in the disquette.

For convinience I attached the files to this message.

Greetings to all.
S.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top