Com Port Access 
Author Message
 Com Port Access

Good day.
I am trying to write some GPS software in Pascal 7.0 - Could someone please
tell me how to access a Com Port so that I can download the tracks from the
GPS?

Marc Arndt

;-)



Wed, 18 Jun 1902 08:00:00 GMT  
 Com Port Access

Quote:

>Good day.
>I am trying to write some GPS software in Pascal 7.0 - Could someone please
>tell me how to access a Com Port so that I can download the tracks from the
>GPS?

>Marc Arndt

>;-)

com1 address is $3F8
com2 address is $2F8

Use the port[] command!

To write a value to com1
 port[$3F8] := value;
To read a value from com2
 value ;= port[$2F8];

I don't know if you'll have to do this but to set up the port do the
following

port[com+3] := 128;
portw[com] := 115200 div baudrate;
port[com+3] := 3;

There's more too this...  (But i'm really not the expert on this!!!)

Have fun!

Bye



Wed, 18 Jun 1902 08:00:00 GMT  
 Com Port Access

Quote:
> >I am trying to write some GPS software in Pascal 7.0 - Could someone please
> >tell me how to access a Com Port so that I can download the tracks from the
> >GPS?

Go to "http://members.xoom.com/alexfru" and find there a "communic.zip" archive
file at the "general programming" area. It's a simple serial I/O unit with a
chat program based on it.
Have fun!!!

Good Luck
Alexei A. Frounze



Wed, 18 Jun 1902 08:00:00 GMT  
 Com Port Access

You can't use just the port-command for reading, because you don't know if the
com-port has received a new character, or it is the same one that you read the
last time (if the same character was sent multiple times). What you need, is a
interuptdriven software, but it's hard to write your own. I recommend you to buy
a software like Async Professional, which include Borland Pascal-compatible
procedures and classes.

Ingvar

Quote:


> >Good day.
> >I am trying to write some GPS software in Pascal 7.0 - Could someone please
> >tell me how to access a Com Port so that I can download the tracks from the
> >GPS?

> >Marc Arndt

> >;-)

> com1 address is $3F8
> com2 address is $2F8

> Use the port[] command!

> To write a value to com1
>  port[$3F8] := value;
> To read a value from com2
>  value ;= port[$2F8];

> I don't know if you'll have to do this but to set up the port do the
> following

> port[com+3] := 128;
> portw[com] := 115200 div baudrate;
> port[com+3] := 3;

> There's more too this...  (But i'm really not the expert on this!!!)

> Have fun!

> Bye

  ingvar.isendor.vcf
< 1K Download


Wed, 18 Jun 1902 08:00:00 GMT  
 Com Port Access
Hi,


Quote:
> This is a multi-part message in MIME format.

V-Cards... yuck. Is there any serious use for them anyway? Also, 78 is
the number of life, the universe and everything. But that just as a side
note.

Quote:
> You can't use just the port-command for reading, because you don't know if the
> com-port has received a new character, or it is the same one that you read the
> last time (if the same character was sent multiple times). What you need, is a
> interuptdriven software, but it's hard to write your own.

The recommendation of interrupt use is good, but you don't have to dive
into interrupt programming just to use the COM port. The problem you
describe can be solved by waiting for a flag to be set at the Line Status
Register found at BaseAddr + 5:

   repeat until Port[Com + 5] and 1 = 1;
   b := Port[Com];

This is called "busy waiting", and please note that you also have to wait
for the UART to be ready for writing (this is especially important for
low baud rates!):

   repeat until Port[Com + 5] and $20 = $20;
   Port[Com] := b;

For the complete semantics of all registers you could for example consult
the PC16550D datasheet which is available for download from National Semi-
conductors in PDF format.

 - Sebastian

--
This posting was manufactured to meet critical quality standards.
If you believe the posting has a manufacturing defect, please call our
Quality Management Department at ++49-800-BASTISOFT.



Wed, 18 Jun 1902 08:00:00 GMT  
 Com Port Access
Unfortunately I do not have any sample code for Pascal for doing
serial I/O however I do know of a good tool that you might want to
look at called the Software Wedge. It is used quite often for
interfacing GPS devices to other application programs. GPS receivers
output data in a simple comma delimited, carriage return terminated
format which is compatible with all versions of the Software Wedge.
Visit www.taltech.com for more information.

On Thu, 2 Dec 1999 09:03:52 +0200, "Marc Arndt"

Quote:

>Good day.
>I am trying to write some GPS software in Pascal 7.0 - Could someone please
>tell me how to access a Com Port so that I can download the tracks from the
>GPS?

>Marc Arndt

>;-)



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. COM port access

2. Com Port Access

3. Access to COM-Port

4. Accessing COM ports under Win NT with BP 7.0

5. Accessing com-port

6. Accessing COM port

7. COM (Serial) Port Access in Borland Pascal

8. Com Port Routies

9. Problems with com ports and windows 2000

10. com port already in use broblem

11. Simplying serial com port selection

12. Com-port

 

 
Powered by phpBB® Forum Software