Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial Port Address ...

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi

What's the decimal address of the 9 pin serial port?

Thanks,


Brad Harris
 
COM1, 2, 3, 4 etc????

Typically, Com1 is 1016 decimal (3f8 hex)
and Com2 is 760 decimal (2f8 hex)
These addresses, while usually correct, are not guaranteed to be as stated because they are hardware dependant. What is wrong with using the functions supplied with Basic that do all this for you:
eg:

OPEN "com1:1200,n,8,1,cd0,cs0,ds0,op0,rs,tb256,rb256" FOR OUTPUT AS #1 LEN = 256

And then use something like:

PRINT #1, CHR$(255);

To send the byte 255 out the port at 1200 baud or whatever... This way you get buffered IO and don't have to worry about polling the port or dealing with interupts etc..


Kim_Christensen@telus.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top