Modem Basics

Copyright 1995, John Woody. All rights reserved.
Originally printed in the December, 1995 issue of PC Alamode Magazine

What You Need to Communicate

[Hardware] | [Software] | [High-speed modem setup]
[Flow Control] | [Modem LEDs] | [AT Commands]


Alamo PC Organization: HOME > PC Alamode Magazine > Columns > Comm Corner 

In order to communicate, there must exist at least two people- one to send the information and one to receive it. Computer telecommunications is similar in that one must send and receive information from a remote site on a computer. Telecommunication connections involve five elements which complete this transaction. These elements include: a sending computer, a sending modem, telephone connection, a receiving modem, and a receiving computer. As in plain old communication, there must ultimately be two computer systems involved.

 To communicate with computers, one must have, in addition to the computer and modem, communications software which accomplishes two critical functions. These are control of the connection and sending or receiving the data. Communications software controls the modem and makes sure that it operates within parameters (equivalent to talking the same language in human communication). This software also establishes and maintains the link between the two modems (equivalent to dialing the correct phone number and keeping the phone off the hook).

 The receiving modem must also have equivalent hardware and software in order for the connection to be successful. The two computers, associated equipment, and software do not have to be identical to communicate, but each must be able to talk to one another for the link to work. This language which each computer uses to communicate is fournd in the communications program protocols. The whole communications operation can be automated in such a way that each system can be programmed to send and receive data at a pre-determined time.
 
 

The Technology Needed to Communicate

Remember from our previous articles that a MODEM (MOdulator/DEModulator) is electronic hardware which takes many forms as an output/input (I/O) device attached to computer systems. Modems take many shapes. They can be external black boxes, internal computer cards, or laptop PCMCIA cards. As I/O devices, modems are connected to the computer at one point and to the telephone link at another. Communication software controls modem microprocessors via two types of information: data and modem commands. Modem microprocessors accept and act on special sequences of characters sent by the communications software to place it in "command mode". The instructions represented by these characters perform such tasks as the equivalent of picking up the phone receiver, dialing a phone number, and making a connection to another modem. The character instructions, additionally, represent commands to control how the modems react between themselves, such as the speed of data between themselves, the number of times the modem rings before hanging up, and the form of modem status information that is sent back from the modem to the computer. This special language is written in the form of "AT" commands which must be common at each modem for them to communicate. The AT commands control the modem microprocessor.
Remember that PCs speak ones and zeros. They are digital. A bit of data has one of two discrete levels, on or off. In a telecommunications link, digital data is sent from one computer to another. The telephone system, however, is an analog system designed to accept the human voice. Even though the telephone system uses digital technology to move speech efficiently, it is intended for speech and not series of ones and zeros. Analog signals do not have discrete levels like ones and zeros, but can have any value between the minimum and maximum.

 Data modems are primarily serial devices. Whereas the PC computer processes data in parallel, ie., multiple bits (eight, sixteen, thirty-two, sixty-four) at one time, analog transmissions are sent one bit at a time. Data is moved within and out of the computer in either parallel or serial form. This movement is through parallel or serial ports within the computer. As each port name implies, data moves together (parallel), or one bit at a time(serial).

 The telecommunications process takes place when the communications software sends the digital data from the computer to the modem via a serial port. The modem transposes this data into analog form which can be transmitted efficiently along the telephone line to the receiving modem. The receiving modem then reverses this process by changing the analog data back into digital data and passes the data to the receiving computer via the serial port. The interpretation from digital data to analog data is known as "modulation", and the reverse process is known as "demodulation", as stated above.

 In general, the modulation/demodulation process involves sending a carrier signal with one or more of the modulation schemes imposed. From high school physics we know that all modulation schemes involve amplitude, frequency, or phase as the method of change. The communications standards rely on one or more of these techniques to send and receive the data. The digital ones and zeros are translated into these modulation techniques by the modem standards. The communication standards dictate details such as the carrier signal frequencies, how the data is modulated, and how fast the data is transmitted. The modem conforms to these standards. In creating a communications link, both modems must be able to meet one or more of the standards, ie., speak the same language. The bleeps, clicks, and hisses one hears during a connecting process is an indication that the modems are finding a common standard, ie., language to speak.
 
 

The Language: Communications software

Communications software contains the language which makes the computer and modem operate. The software is written to cause the modem to conform to standards (protocols) of operation. These software programs issue commands which control what the modem does. The first of the two functions preformed by communication programs is to issue commands. Commands include setting of transmission speed, answering or dialing the telephone, or listening for dial tones. Once two modems establish contact, other commands negotiate to find the highest common standard (protocol) at which both modems can communicate with each other.

 The second of the two communication functions controls the sending and receiving of data between the two modems. This function includes the ability to generate files, messages, and other data for transmission. Most communications programs contain at least a text editor. Most include other functions to make the movement of the data easy.

 Most modems in the market today, include FAX capabilities, which allow the computer/modem connection to transmit faxes just as stand-alone units do. Standards (protocols) are designed into the modem hardware and into fax/communications software which control how the data is transmitted as a fax.
 
 

High Speed Modem Setup

The first item to address during a modem setup is to have telephone service conveniently located at the computer/modem. There are other methods of connecting one's modem to the outside'. Three types of telephone lines are typically available: voice grade, conditional voice, and leased lines. Direct connections through dedicated leased lines and all digital through INTEGRATED SERVICES DIGITAL NETWORK (ISDN) are typical of other methods which offer connection capabilities. These are costly and are used in business connections for the most part. Most of us will use the telephone through a serial dial-up modem.

 Voice quality telephone service with tone dial' capabilities meets the dial-up requirements for most serial modem transmissions. The modem telephone can be the regular voice phone or it can be dedicated. Part of the setup should include disabling certain voice telephone services such as "call waiting". This is accomplished by dialing *70 before the telecommunications session starts, or by setting that parameter in the communications software control process.

 Another dial-up telephone method is to have a dedicated voice quality telephone line strictly for the computer/modem setup. The telephone service, in this case, should be basic, with no-frills, and unlisted. The actual connection from the wall jack to the modem is through an RJ-11 jack at both the wall and at the modem. Normally, at the internal modem or at the serial I/O connection there is a second RJ-11 jack for a handset telephone. This is handy as a second line or dealing with phone problems. Remember that the modem connection is broken during transmissions if the handset is lifted off the hook.

 Serial/Com port selection is another consideration in the setup process. We have touched on this topic in detail in previous articles. One of the four (4) serial/com ports must be available for the modem. Dip switch settings on any internal modem must correspond to the used serial/com port. Any serial I/O card must also have its dip switches set to reflect the serial/com port it represents. Each serial/com port is assigned a name, address, and interrupt. Interrupts are signals to the CPU that it needs attending to. In this case, when the serial/com port has data to transfer, its IRQ signals the CPU to act upon it.

Their names are COM 1, COM 2, COM 3, and COM 4. The addresses and interrupts are as follows: COM 1, 3F8, IRQ4; COM 2, 2F8, IRQ3; COM 3, 3E8, IRQ4; COM 4, 2E8, IRQ3.

The process of changing parallel or serial data at the serial/com port is accomplished within an integrated circuit (a chip) known as a UNIVERSAL ASYNCHRONOUS RECEIVER/TRANSMITTER (UART). UARTs include a serial port and baud rate generator which controls when, what and how fast data are sent from the serial port. High speed internal modems normally have UARTs built in which handle the serial port tasks and data movement. In addition, the latest version of the UART (the 16550AFN) has FIFO buffer storage which greatly cuts down on lost data due to dropping characters or overrun' in high steep transmissions. External high speed modems plugged into serial I/O cards on COM 3 or 4 also need the 16550 AFN or later UART in the serial loop. Most serial I/O cards have the ability to install a 16550 AFN UART on one of its pin-outs.

 (NOTE: If you are using a modem with bps speeds of 9600 or higher, make sure your modem or serial I/O card have the 16550AFN UART installed.)
 
 

Flow Control

The next step in setting up a modem is to place the proper parameters in the communications program. Each communications program is different in its detailed setup. Nearly all communications programs, do, however, require knowledge of the modem brand name, or at least, whether or not it is "Hayes compatible"; the modem speed, the computer serial/com port, and IRQ. In addition, high speed modems must set the "flow control".

 Flow control or "handshaking" establishes who talks, when. Like ham radio operators who say "over" when each is through speaking to signal to the other that he is finished, flow control in modems does the same thing. This prevents the modems from both transmitting at once. The RS-232 standard supports two forms of flow control in PC serial ports. These are "software handshaking and hardware handshaking". Software handshaking, as the name implies, involves sending a signal within the data stream to indicate when the transmission is complete, to say "over", and hardware handshaking involves sending signals via a separate channel to indicate "over".

 Additionally, there are two areas of flow control which are known as "local flow control" and "end-to-end flow control". Local flow control specifies how handshaking is accomplished between the serial/com port and the modem. End-to-end flow control dictates the type of handshaking between the two modems. Further, end-to-end flow control is determined automatically by the error-control standards in the modem or by the file-control protocol used by the communication program being used. The communications program setup provides a choice between hardware or software handshaking. The setting should always be on hardware handshaking at higher speeds, 9600bps or higher.

 Hardware handshaking causes two signal lines to be exercised within the modem when turned on. These signal lines are called "clear to send" (CTS) and "request to send" (RTS). CTS is activated when the modem is ready to receive data and RTS is activated when the modem is ready to send data. Activation is caused by increasing the voltage on these lines. Decreasing the voltage turns them off. Combinations of voltage changes on these lines not only causes the ready state for the modem, but, also causes the actual data transfer to start and stop. Voltage increases on both lines causes data transfer, and lowered voltage causes data to stop flowing.

 The similar software flow controls are exercised when the software sends the XON/XOFF characters within the data flow. XON at the beginning of the data flow starts the transmission and XOFF at the end of the data flow stops it. Do not use XON/XOFF in high speed communications.
 
 

Modem LEDs

This section will briefly touch on the LED indicators which are part of external modems. There may be a LED for on/off. Additionally, there are usually LEDs for high speed (HS), auto answer (AA), carrier detect (CD), off hook (OH), receive data (RD)(RX), send data (SD)(SX), terminal ready (TR), modem ready (MR), and several additional indicators which varies with the modem brand. The US Robotics Courier 28.8kbps unit has indicators for request to send (RS), clear to send (CS), synchronous mode (SYN) and error control/fax operations (ARQ/FAX). Internal modems do not have these indicators available. However, there are programs which simulate them on the monitor screen when the communications program is running. Some Windows communications programs have these indicators built into their program operation.
 
 

AT commands

Commands are issued by the communications program to cause the modem to do its functions, e.g., dialing, answering, or hanging up. The method for issuing these commands comes in the basic form of two letter commands which conform to a standard. These commands are known as the AT commands. AT commands are issued from the communications program "terminal screen" and signal to the modem that commands to it follow. Most communications programs issue a majority of the commands needed to effect data transmission. In some cases, basic AT commands may be issued from the terminal screen for troubleshooting purposes. There are hundreds of AT commands in the TIA/EIA/602 (modem) / TIA/EIA/578 / (class 1 Fax) / TIA/EIA 592 (class 2 Fax) standards. Nearly all modem manuals contain the complete list of AT commands for their particular modems. Some modems are case sensitive to AT commands, so it is a good idea to always type them as capitals.

 The basic AT commands which aid troubleshooting are:

  1. AT [enter], for basic serial/com port to modem tests;
  2. ATE1 [enter], to make the letters appear on the screen as they are typed;
  3. ATE0 [enter], to make the letters disappear (these are echo commands;
  4. ATH1[enter], makes the modem pick up the receiver;
  5. ATH0 [enter], makes the modem hang up the receiver;
  6. ATM1 [enter], turns the modem speaker on;
  7. ATM0 [enter], turns the modem speaker off;
  8. ATM2 [enter], sets modem speaker medium range; and,
  9. ATDXXXXXXX [enter], dials a number;
  10. ATZ [enter], resets the preferred profile that you have previously chosen.

  11.  

     

Conclusion

This is a summary of some of the considerations and settings required to get one's modem going. Other considerations will be covered in articles to come.