×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Comm port programming

Comm port programming

Comm port programming

(OP)
Hello all, my mind's been getting rusty lately, I need information on programming the comm ports directly (hardware level) and hopefully also be able to do autodetection of any modems and comm ports (including IRQ's).

Now what I remember is that the I/O ports are located at pretty standard places, and that in general I want to be able to respond quickly to received characters (which means using IRQ's).  Each port has four registers I think, but they take up 8 addresses because they're repeated (I think).  They used to have pretty standard IRQ's but no longer.

Now my idea of autodetection of IRQ's is to first determine the I/O addresses (which are pretty standard) and setup a loopback function, then trap each candidate IRQ and send a byte, which should be received immediately and call the IRQ.  Is this process correct?  How stable is this operation?  How reliable is it?

Detection of modems I think should be easy, just send "AT\0xd\0xa" and check if you received an "OK".

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

Replies continue below

Recommended for you

RE: Comm port programming

(OP)
Also need info on the HAYES command set, the most important of which is HOW THE HECK DO YOU TELL THE MODEM TO HANG THE PHONE!!  I keep sending ATH but it just gets sent to the remote computer.  I try +++<enter> ATH<enter> but it doesn't seem to always get hung up.  Maybe I should do +++ATH ???

Also... just how important are those RTS CTS DCD lines?  Doesn't HAYES cover all of those?  Isn't DCD = CONNECT xxx?  /DCD = NO CARRIER??  Do I really need to use those freaking lines?

"Information has a tendency to be free.  Which means someone will always tell you something you don't want to know."

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close