If there is a device connected to COM1 on your PC that is transmitting
data when Windows boots, Windows will sometimes assume that the device
is a serial mouse and install a serial mouse driver for the COM port
and thereby make the port unavailable to other applications.
There is one simple way to test if this is the problem and that is to
disconnect whatever device is connected to COM1 and reboot.
If you can open COM1 with no device connected to the port then that is
the problem.
The following article on the Microsoft web site describes how to cure
the problem by using a switch in the BOOT.INI file:
http://support.microsoft.com/kb/131976
If you still cannot use the port then some other applciation program
has the port open.
You could use the Task Manager in Windows to see what other programs
are running and perhaps shut them down one by one until you discover
which one has the COM port open.
Do you have Pocket PC or Palm Pilot that you connect to the PC?
ActiveSync and the Palm Desktop software commonly open the COM port
and leave it open.
You may also want to check the BIOS settings on your PC to see if COM1
is enabled or what its settings are.
The last possibility is that you have some other hardware device
installed that is using the IRQ that COM1 is assigned to.
For example, COM1 normally uses IRQ4. If your network adapter is also
configured to use IRQ4, your COM1 port will be effectively disabled
because the network adapter driver will own the IRQ and the COM port
will appear to other programs to be in use.
For more serial I/O tips, tricks and free utilities, visit
www.taltech.com