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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comm port programming

Status
Not open for further replies.

AmkG

Programmer
May 12, 2001
366
0
0
PH
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."
 
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? &quot;Information has a tendency to be free. Which means someone will always tell you something you don't want to know.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top