home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR10
/
COMM_IRQ.ZIP
/
COMM-IRQ.EXE
/
NEWSSEPT.93
< prev
next >
Wrap
Text File
|
1993-09-11
|
17KB
|
271 lines
Digital Communications - by Hank Volpe
A New-Age Guide to Holistic Modeming
One engaging facet of my "love-affair" with modems has been observing
how modems have evolved. The modem and I started from very humble
beginnings; just a simple, 300 baud modem, a rotary dial handset and a
terminal. All this was easy to understand, easy to touch, and easy to use.
Kind of like using a toaster oven instead of one of today's microwave food
nukers. In fact, back then (believe it or not), speed dialing was
considered how fast you could move your finger from one hole on the rotary
phone to another. Very primitive, yes...but simple, in fact more than
simple because you, the modem user, resided right at the center of this
extended machine built from its associated parts. In fact, you were
actually part of the hardware. You and the machine were one! Your fingers
did the walking, your ears listened for carrier tones, and when you heard
one, you reached out and pressed a button on the modem to magically connect
your terminal to the computer on the other end of the phone line. You were
happy, the machine was happy, and your terminal was happy too.
Since then things have gotten a lot more complicated. A layer of
independent thinking hardware has isolated us from the machine. Comm port
selections, IRQ allocations, DMA channels, intelligent Video Cards, write-
delayed disk caches, and buffered Uarts are just part of the new world of
modeming. Some of the brave-of-heart are working with threaded program code
and event-driven application systems that are inter-connected in ways that
are invisible to us.... except for a friendly little icon, or a pretty
window that opens up and says "Critical Error Handler Active...System
Aborting...Have a Nice Day", turns into a nice Super VGA flower, wilts on
the screen and promptly locks up your comm session. Frustrating,
yes.....but very graphically beautiful, and polite to you too!
The source of this frustration is the key. Frustration comes from not being
in control anymore. If only you could see the whole picture before you. The
working parts of your computer hardware are now more inter-related than
ever, and those inter-relations affect the overall satisfaction you derive
from modeming. Applications like Windows hide many of the systems logical
interworkings from you. Its almost as if computer hardware exists in a
politically correct universe. No cause or effect (at least that you can
see). A universe where each device is not a millstone, a mistake or a
handicap...no, quite to the contrary, its just a system resource that is
"misunderstood". Of course, the real question is if the orchestrator, the
"Being" sitting in the center of the computer universe (you, oh wise one)
is up to meeting the challenges that all of this system integration can
present?
Well, I'm afraid that its not going to get any easier, and that the days of
the rotary phone are over for good. Yet at the same time, things happening
in Digital Communications are beginning to take on almost a magical form.
We now have pictures, detailed graphics, simulations and on-line games
possible just because of the shear increase in speed possible over a simple
telephone wire. Around the corner is the promise of ISDN and truly
interactive voice/data/text applications. Those days, and the computers
that will operate then, will make what we're doing now look as primitive as
the 300 baud modem looks today. Maybe those new computers will set off
fireworks on the screen and whistle Dixie before the pretty Super VGA
flower opens up and locks up your system? Who knows for sure?
However, between then and now, a lot of good modeming is possible if you
spend a few minutes learning some simple methods of getting a modem to work
in harmony with all of your other system hardware. Yes, its a holistic
approach, a politically correct approach, a really 90's approach to
modeming! (Of course, any good Engineer worth his weight in chips will tell
you that knowing how the sum of the parts of your machine play together is
just plain, old-fashioned tech-ability...and as we all know, "old-
fashioned" is something very politically incorrect to even think of in
these enlightened times!). So sit back, loosen up, become one with the
modem and together we'll find out how to deal with getting the modem to be
one with you too. Remember, your modem's not dead...its just
communicatively challenged!
Step One - become one with the hardware
Ok, we've had some fun above, but seriously, you can easily solve most of
your computer system integration problems if you would just take the time
to find out what you have installed in that machine of yours. Get to know
your hardware, and in particular, the Input/Output (I/O) devices that it
has at its disposal. Every computer made since the IBM-PC needs to have a
video card of some sort, a parallel port (or two) for a printer, a serial
port (or two) for serial devices (like modems, a serial mouse, a plotter).
Each of these devices will have usually have a corresponding connector
coming out the back of your machine. Take a look in the back. The cable
attached to your monitor will be for your video card, but from that point
on, it could become a bit more difficult. Your printer most likely hooks to
a parallel port, and your mouse to a serial port...however this is not
always the case. Count the connectors, especially the unused ones, because
that will give you an idea of how many system resources you might have at
your disposal.
This visual identification is important, however you now need to know how
those devices are configured into your system. This configuration
information can be stored in the CMOS memory in your computer (if you have
an ISA, EISA, or MCA bus computer) or in configuration switches on the old
PC-XT's. In any case, this configuration can be read and summarized by many
different programs. Norton's System Information (Sysinfo.exe), or PC-Tools
(also called Sysinfo.exe) are two commercial programs that can do this.
There are also several shareware programs that will too; CINFO20.ZIP,
SYSCHK37.ZIP, and SNOOP200.ZIP will all give you a summary of installed
hardware. My personal favorite is INFOPLUS.EXE, a shareware program (latest
version is IFP1P157.ZIP). When you run these programs you will get
information like the following;Printers: 1 Serial ports: 2
Device: LPT1 Device: COM1 COM2
Base port: $378 Base port: $3F8 $2F8
Timeout: 20 UART: 8250 8250
Busy: yes Timeout: 1 1
ACK: no Baud rate: 2400 1200
Paper out: yes Data bits: 8 7
Selected: yes Parity: none none
I/O error: no Stop bits: 1 1
Timed out: no Break: no no
The "device" reported is the name that DOS uses to control its as a file.
All devices under DOS can be opened, written, and read as files. LPT1 is
DOS's name for a printer. If you wanted to use your printer as a file, you
could copy a text version of this article to it by typing "COPY NEWS.TXT
LPT1".
The "base port" is the actual hardware address of the port. Every device
needs a unique address that the computer can use to send and receive
information. The "$" is a programmers notation meaning that the address is
displayed in Hexadecimal notation. Since computers work in powers of "2",
this is quite natural. Don't worry about converting to decimal, because as
long as you configure totally in Hexadecimal, you should be able to avoid
any address conflicts.
Its very important for you to realize that no two computer devices can
share the same I/O address. Think of it like a mailbox. If you and a
neighbor share mailbox addresses, you might get his mail, she might get
yours, or you might not get any. Furthermore, if two devices share the same
I/O address, the computer will think that it only has one of them and not
two. For example, if COM2 above had the same address as COM1, the Infoplus
program and any others running would never be able to find it. As far as
they are concerned, there is only 1 Com1. From a computer standpoint, this
is a waste of a resource. From an electronic-system standpoint, this is
trouble...because two I/O ports on the same address may disable either one
from working properly with the computer.
One of the biggest problems with installing modems, especially internal
modems, is address conflicts with existing hardware. Modems will not work
properly, programs will not access them properly, and you'll most likely
get a splitting headache. Count the connectors in the back, then run a
program like Infoplus. Make sure that the devices you found match the
displayed information reported by your system. Do this before you install
anything and you'll save yourself a lot of trouble!
Since we're working with serial ports, lets look at the rest of the
displayed information. The "Uart" is a chip that converts the computer's
data into a serial form. There are various types of Uarts, with the 8250,
16450, 16550, 16550A being the one's found in 99.9% of all PC-Compatible
serial ports. Why display the type? Well, the type Uart you have can make
some applications run faster or with less errors. The 16550A is a special
type of Uart that has a 16-bit buffer contained on the chip. This buffer
can hold incoming data when the computer is too busy to process it. Some
programs, especially those running under Windows, can take advantage of
this buffer. Knowing the type of Uart can help you a great deal when it
comes to integrating multi-threaded or multi-tasking applications using
high-speed modems. The other comm parameters such as baud rate, data bits
and parity are called "Communication Session Parameters" and will change
depending on the program you run.
Step Two - Feel your Interrupts
Unlike the printer, modems need another type of control hook, called an
interrupt line. Interrupt lines serve the purpose of getting the computer's
attention. Here's your computer, making a perfectly beautiful Super VGA
flower. How does it know the comm port needs attention? It could ask
constantly, but this would slow things down quite a bit. The best way is
for the comm port to tell the computer when it needs attention. This type
of interrupt is called a "Hardware Interrupt". A PC can handle 8 of these,
a ISA, EISA, MCA machine can handle 16. Some are already in use. How do you
know which one to pick for your comm ports? Lets take a look at what's in
my machine using Norton's Sysinfo;
No Address Device Area
IRQ 00 D558:0971 Timer Output 0 BIOS
IRQ 01 D558:0A77 Keyboard BIOS
IRQ 02 F000:EF6F [Cascade] BIOS
IRQ 03 CF86:0310 COM2 BIOS
IRQ 04 F000:EF6F COM1 BIOS
IRQ 05 F000:EF6F LPT2 BIOS
IRQ 06 03FE:00B7 Floppy Disk DOS System Area
IRQ 07 0070:06F4 LPT1 DOS System Area
IRQ 08 03FE:0052 Realtime Clock DOS System Area
IRQ 09 F000:ECF3 Reserved BIOS
This display shows static information, in other words, its showing us what
each IRQ is allocated to do without really checking. IRQ7 is not used by my
printer, and IRQ5 is not used by a second printer (I don't have one). This
table is merely a reference for you, guiding you as to where you should
look when integrating new IRQ devices. The "address" displayed is a memory
address of the program hook (TSR or ROM) that controls the device, and the
area points to the memory area where this TSR hook resides.
The next biggest problem with integrating a new serial port or internal
modem into an existing machine comes from IRQ conflicts. Your machine can
support up to 4 comm ports (and more with proper hardware and software).
However, you have a limited amount of IRQ lines to work with. You can share
a line under certain conditions. For example, Com1 and Com3 can share the
same IRQ line (4), and Com2 and Com4 can share the same IRQ line (3).
However, if you try to use Com1 and Com3 at the same time (modem and mouse
lets say), you get into serious problems. The best way to get around this
problem is to purchase a serial card or an internal modem that allows you
to use any IRQ line you wish. Most "modern" (post 1989) serial cards come
with that feature. Good choices for Com3 would be IRQ5 and for Com4 IRQ7.
Step Three - Resolve Inner Conflict
Suppose you have a serial port that does not work properly at this moment.
The first logical place to look would be the base port address. Make sure
its distinct from any other. Changing the base address is accomplished
simply by changing the Comm designation number. By default, Com1 uses $3F8,
Com2 $2F8, Com3 $3E8 and Com4 $2E8. Check you settings. Now after verifying
the base address is correct, check the IRQ settings. If you cannot re-
configure the IRQ (older Comm cards are locked into following the base
address), then make sure you never use Com1 when using Com3 or Com2 when
using Com4. I have such a condition here. I use Com1 between two computer
systems (Laplink), Com2 for my mouse, Com3 for my modem (since I'm not
Laplinking when modeming) and Com4 for a nice, cheery decoration (no use
currently).
If you have your hardware currently installed and you are not sure if you
have an IRQ conflict or not, you can run Modem Doctor (MODEMD52.EXE). Modem
Doctor actually will generate a self-test IRQ interrupt (compatible with
99% of Uarts) verifying which IRQ line they are using. Modem Doctor's
display for that looks like this;
Port assignments Base(hex) Irq Special Port Usage
Com port 1 [X] 3f8 4
Com port 2 [X] 2f8 3 IRQ assigned to a mouse driver
Com port 3 [X] 3e8 4
Com port 4 [X] 2e8 3 IRQ assigned to a mouse driver
Com port 5 [ ] not found
Com port 6 [ ] not found
Com port 7 [ ] not found
Com port 8 [ ] not found
The 'X' means the port passed preliminary diagnostics. The Base port
address is the same as Infoplus's information. The Irq display shows the
results of a self-generated interrupt and verifies that Com1 uses IRQ4,
Com2 IRQ3, Com3 IRQ4 and Com4 IRQ3. Additionally, Modem Doctor detected
that IRQ3 is being used by my system mouse drive (so I shouldn't try to use
a mouse and a modem on Com4 at the same time). Now if Modem Doctor reports
that Com1 and Com2 are using the same IRQ, this most likely is due to an
incorrect serial port or internal modem installation. Same with Com3 and
Com4 using the IRQ. Also, If Com1 and Com2 are using the same address, Com2
won't be found......again, if you counted your connectors in the back, this
would be a tip-off to you that something is configured wrong. Another tip
off would be when Modem Doctor tries to run diagnostics on your modem.
Severe errors or inability to communicate to the modem microprocessor would
also be tell-tale signs of an address conflict. In either case, just
checking the switch or jumper settings on your serial card or internal
modem will most likely clear up any problem. Here's another tip along the
same time (perfect for the switch-squeamish among us). Simply remove the
new internal modem or serial port. Run Infoplus, Sysinfo, Modem Doctor or
whatever. If these report all is ok, especially if they report the same
hardware is installed as when you had the new device in your machine, then
you *KNOW* you have configured something wrong on the new modem or serial
card. Check the switches with the manual, insert again, and repeat the
test.
Step Four - breathe, relax, rest
If you are having serious hardware integration problems with an internal
modem or an additional serial port, try isolating your problem using some
of the tips and programs listed above. You can find most of these shareware
programs on your favorite BBS, shareware library, or on my BBS. Until next
time, close your eyes, breathe, relax, become one with your
hardware.....and learn all you can about what you have installed in that
pretty little, window-making box of yours. If you have a question about
Digital Communications, please drop me a line on my BBS or by using the US
Mail (Paper!...How Quaint!). Write to Hank Volpe, PO Box 43214, Baltimore
MD 21236, or call the Modem Doctor BBS at 410-256-3631 (baud rates 300 to
16.8kbps).