Serial-port

Just starting out? Need help? Post your questions and find answers here.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Seldon.

Hi !

I have 3 questions: may I use the serial port (COM1/COM2) with
PureBasic (using some lib/functions or Windows-API) ?

Is the .dll support, working fine ?

I saw PureBasic has inner functions to call Direct-X, in your
opinion is faster than BlitzBasic or not ?

Thank you in advance for informations.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by merendo.

Hello Seldon,

Nice to get you to know.

For what do you need the COM-Ports?

I started out with BlitzBasic. I think PB is quite faster than BB. This is a comparison of some languages, including BB and PB (In German, But I think it won´t be difficuilt) http://www.blitzbasic.de/showcase/speed.exe .

Regards, merendo

We always need to hear both sides of the story (by Phil Collins)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Seldon.
For what do you need the COM-Ports?
Thanks for your reply.

I need to control a custom device which uses the serial port. Do you
know if it's possible to do that with PureBasic? Or must I use the
Windows API ?
I started out with BlitzBasic. I think PB is quite faster than BB.
I also am an Amiga user, so I'm familiar with both BB and PB. Since
I need a very fast gfx, I found out BB is perfect, but it lacks
of good API's support and commands for serial ports. So, I'm thinking
to use PB to develop a own DLL, which the BB program uses to control
the serial-port.
Ok, I'll try... though with Direct-X, BB seems slightly
faster.

Regards.
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by merendo.
Ok, I'll try... though with Direct-X, BB seems slightly
faster.
Well, any time you run the test, it returns different results. Common is PB faster.
I need to control a custom device which uses the serial port. Do you
know if it's possible to do that with PureBasic? Or must I use the
Windows API ?
Hmm... I´m not sure. I´m not an API-Expert. I think you also can use a PB-UserLib. Might El_Choni has got one, which may help U. El_Choni? Have you got an userlib to access the com ports?

We always need to hear both sides of the story (by Phil Collins)
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by El_Choni.

Hmmm... let's take a look at my userlib stocks... Sorry, yesterday they took the last one left .

I'm sorry, I can't help you, I'm not an API expert either, and I know nothing about COM ports, or what they are used for (well, I know my computer has four and that they are numbered). I can't promise you anything, but if you give a list of the functions you need, I'll take a look at the docs.

Bye,

PS: of course, you can always use the API to do it.

El_Choni
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

If you look on the PureBasic website under the Download section, there is sample code (PureFrog) showing how to use the com ports to control an external device.

That might be a good place to start.
Post Reply