Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

About programming Serial/parallel ports

Status
Not open for further replies.

TronicBrain

Member
I have read some threads about programming Serial/parallel ports.

And I just Want to ask about the most popular programming language is used to communicate with Serial/parallel ports.
I have started learning Borland Delphi 7few days ago.
I was told that it's the most suitable for purposes like these.
Would some one please tell If this is the best choice for me.

I have finished my school and this is my mission for 2.5 months.
In order to make communication between my PC and my PICs.

Any advice will be appreciated
 
in my opinion borland Delphi is an good choice for controlling the serial & parallel ports , because i understand that it is very similar to Pascal , which is an excellent language to learn..
 
williB said:
in my opinion borland Delphi is an good choice for controlling the serial & parallel ports , because i understand that it is very similar to Pascal , which is an excellent language to learn..

Delphi is essentially Visual Pascal for Windows, and is an excellent popular language, as you say, ideal for learning programming as it forces you to learn good habits.

You should be aware though that any NT based Windows (NT, 2000, XP) doesn't allow direct access to the ports, you need to access them through a driver - this applies to ANY language running under Windows NT.
 
Nigel Goodwin said:
williB said:
in my opinion borland Delphi is an good choice for controlling the serial & parallel ports , because i understand that it is very similar to Pascal , which is an excellent language to learn..

Delphi is essentially Visual Pascal for Windows, and is an excellent popular language, as you say, ideal for learning programming as it forces you to learn good habits.

You should be aware though that any NT based Windows (NT, 2000, XP) doesn't allow direct access to the ports, you need to access them through a driver - this applies to ANY language running under Windows NT.


There is a programming language called Visual Basic. May be it is a best choice for beginner. Visit website below to read more about VB,

http://www.geocities.com/bagtool/serial_basic.html
http://www.geocities.com/bagtool/parallel_basic.html


free
 
quickbasic is the best.

It is the same as VB except that there are no predefined objects, and it is suited for 16-bit systems. It works under all versions of windows (at least up to 98).

Quickbasic has built-in serial port functions. you can download a free copy from Microsoft. Just do a search for the file olddos.exe
 
Nigel Goodwin said:
williB said:
in my opinion borland Delphi is an good choice for controlling the serial & parallel ports , because i understand that it is very similar to Pascal , which is an excellent language to learn..

Delphi is essentially Visual Pascal for Windows, and is an excellent popular language, as you say, ideal for learning programming as it forces you to learn good habits.

You should be aware though that any NT based Windows (NT, 2000, XP) doesn't allow direct access to the ports, you need to access them through a driver - this applies to ANY language running under Windows NT.

Not strickly true, but u need to be able to run your program as a level one process (i.e. as a driver) but that gets complicated and u need to get into IRQ's and stuff like that.

Anyhow, MS in their wisdom wanted to 'regulate' the use of the serial ports so it knew what was going on. This meant it needed to stop low level access to applications and 'force' the use of dll's of which there are many commercial and free ones. I use NETcommOCX which is a 'wrapper' for the MScomm dll from MS. MSComm was part of Visual Studio up until version 6, since then its not been included and can only be used if older versions are also installed to register the controll properly.

Now, linux is the way to go! lol. haha.
 
mstechca said:
quickbasic is the best.

Only if you happen to write BASIC, and want to write a DOS program, for that it's fine - but writing DOS programs had it's day a LONG! time ago.

It is the same as VB except that there are no predefined objects, and it is suited for 16-bit systems. It works under all versions of windows (at least up to 98).

It will probably work under ME, as ME is 16 bit based and runs on top of DOS - the NT varients probably won't work, as they don't run on top of DOS.

Quickbasic has built-in serial port functions. you can download a free copy from Microsoft. Just do a search for the file olddos.exe

As I remember, that's Qbasic, NOT QuickBasic - QBasic is an interpreter, and used to be provided as part of DOS (before that they provided GWBasic). QuickBasic was a compiler, based on the same language, and was always a commercial product.

As a matter of interest I once ordered QuickBasic 4.5 for a programming job I did, on an Amstrad XT, running 5.25 inch floppies. I'd written the original program using Amiga BASIC on the Comodore Amiga, but the customer then wanted it porting to the Amstrad.
 
If you already know a form of Basic, VB is a good choice, but will take some study just to figure out how to get started. Once you get that, you can port some of your already written basic code inside the forms, without serious modification (except your event traps)
Higher level Windows functions not available in earlier basic versions can also be used via API calls (millisecond accuracy timing and such) and the serial parallel port manipulations also can be API programming calls to freely available pseudo-drivers such as InpOut32.dll.
There are versions that even run under the Windows NT variants.
Dialtone
 
Thank you very much guys for your responds :)

I want to make programs which are visual and I already have a back ground in Pascal and C++.
And I found it the shortest way for me to start with Borland Delphi 7.

BTW, What about Borland C++ Builder?
Any one has experience with this environment?
 
beginner said:
Thank you very much guys for your responds :)

I want to make programs which are visual and I already have a back ground in Pascal and C++.
And I found it the shortest way for me to start with Borland Delphi 7.

BTW, What about Borland C++ Builder?
Any one has experience with this environment?

I've never used it (I can't stand C!), but if you have a background in both C and Pascal you might like to try both. However, you should be aware than Borland Pascal (including Delphi) compiles MUCH faster than C does (it wasn't originally called Turbo pascal for nothing!). Although Turbo C was no where near as fast as Turbo Pascal, it still had the 'turbo' title.
 
Status
Not open for further replies.

Latest threads

Back
Top