View Full Version : COM ports
Dhanashri
11-01-2000, 08:47 AM
The PC has 4 logical COM ports. But physically only two ports are available at any time. One can not use COM1 and COM3 at a time and Also COM2 and COM 4.
Then what is the need of mapping COM2 to COM4 or say COM1 to COM3. Why not have only two ports ?
Thanks in advance for the reply
Jerkymom
11-01-2000, 11:40 AM
Welcome! It isn't necessary to map 4 COM ports, as far as I know. Using Win95/98 I only map COM 1 and COM 2 and have never had a problem. http://www.PCGuide.com/ubb/smile.gif
Kim
courvier
11-24-2000, 04:07 AM
I think i can answer that question for you Dhanashri, first off, a COM is not a port, COM1,2,3,4 are just a convienent way of saying resources that a device would use, such as for COM1: (IRQ 4, IO address 3f8-3ff). PC's usually have 2 serial ports (which are the actuall ports). A device connected to a serial port would need resources right? It could use, say COM2 (which is just a way of saying resources).
Now your probably wondering, if theres only 2 ports, where do the other 2 COM's go? And COM1 and COM3 use the same IRQ (which is 4), and COM2,4 use IRQ 3. Why would'nt all 4 COMs use different IRQs? The reason they cant use different IRQ's is that computers are only built with a certian amount of IRQs (which is 16), to save IRQs, they made COM1,3 share an IRQ, and COM2,4 share an IRQ.
Also keep in mind that an expansion card (such as a modem) can use a COM. The modem is not connected to a serial port, but rather an ISA or PCI expansion slot on the motherboard. This is how you can fill up all COMs on your PC.
A device cant share an IRQ with another device AT THE SAME TIME. So, lets say if you have 3 devices using COMs, COM1 and COM3 are taken up, you can only use one of those devices at a time.
courvier
11-24-2000, 04:10 AM
One more thing, all 4 COMs have unique IO addresses, so that they can be loaded in memory at the same time. If they did not have unique IO addresses then if you would access, say, COM1 and COM3 at the same time, your system would crash. But an IRQ would not cause that problem.
[This message has been edited by courvier (edited 11-24-2000).]
xor_chad
11-25-2000, 05:34 AM
I want to give this a crack.
First off lets get some facts straight.
Port is a word describing a line that communicates with only one device.
The ports on the computer for your RS-232 serial devices are hardwired to the motherboard. The settings for them are NOT however. Your BIOS controls what I/O Addresses and IRQ's will be assigned to these ports(you dont get a DMA channel because serial devices do use them.)
COMmunication ports are Virtual. They are NOT hardcoded. They are a simple means of referring to a packaged IRQ and I/O - nothing more. When you say COM 1, generally you are referring to IRQ 4 and I/O address 0x3F8-3FF. But you could make it ANY other settings you would like(given the limited number of IRQ's that are avaliable).
You CAN use all 4 and MORE at the same time(with proper configuration).
Problems arise when you assign 1 and 3 to IRQ 4 *AND* one or both devices need EXCLUSIVE access to that interrupt. What you then must do is change the interrupt on one of the COM ports.
Problems arise when using old or pourley designed software or hardware that has ITS settings hardcoded. If some modem can only be jumpered for 'COM 2' which is has decided to be IRQ 3 and I/O addr 0x2F8 then you had better set your 'COM 2' settings to this.
I THINK the old standard of having 1/3 and 2/4 share IRQ's was because of the old 8 line IRQ controller. Now days you even have 5 or more COM ports because of devices being on PCI buses and having access to higher IRQ's and TRUE IRQ sharing capibilities.
Geez I hope that cleared things up. If not then i cant say i didnt try. Later...
PS
In essence, you can use all 4, you just have to tweak your BIOS.
------------------
Chad Wilson
C++/ASM Programmer
PC Support Technician
Paleo Pete
11-25-2000, 07:02 AM
I think that one deserves a pat on the back...
very nicely done chad
------------------
Soon as I come up with all the answers...they change the questions!!
Computer Information Links (http://www.geocities.com/paleopete/)
xor_chad
11-25-2000, 06:22 PM
Thanks Pete. Can you tell my girlfriend is out of town and i am alone for the holiday!? Way too much time on my hands. Later...
------------------
Chad Wilson
C++/ASM Programmer
PC Support Technician
nedah
01-21-2001, 09:50 AM
COM Ports
I am trying to resolve a problem with a serial port and the discussion so far has shed some light on the subject. However may I please probe a bit further the technology of COMs in the hope that if I could get a better understanding of the technology I might be able to isolate the are of my particular problem.
As I understand the discussion so far:-
(a) A COMmunication port is a package of resources (i.e IRQ &/or I/O &/or DMA &/or Memory)
(b) Every “device” needs a COM.
(c) In the case of serial ports (devices), the convention is that one of the serial ports has a resource package consisting of IRQ4 and I/O address 03F8 - 03FF. This package is by convention known as COM1 but in theory the resource package assigned to that serial port could be quite different.
Now for my questions:-
1. I know there are only 15 IRQs but how many I/O addresses are there?
2. When I look at the Device Manager/View Resources on my computer the I/O range appears to be from 0000 - FCFF. What is the pattern of progression or, in other words, how do you get from 0000 - FCFF?
3. How can I discover (do I need to know?) the nature of all the “unknown devices” which appear to be absorbing a very large number of I/O addresses ? (My OS is Win95, no games and only normal peripherals ie mouse, printer, scanner, zip drive and external modem)
4. When a peripheral device is attached to a serial port does that peripheral device have access only to the COM package (eg IRQ4 and 03F8 - 03FF) already allocated to that serial port or does the software which comes with the peripheral device allow the peripheral device access to a different COM packages?
Thanks to all you guys who spend so much time dealing with our questions. I didn’t get into computers until I retired and I am constantly amazed by the problems which arise. I look forward to finding out more about this area of resources.
vBulletin v3.6.1, Copyright ©2000-2012, Jelsoft Enterprises Ltd.