Digital Communications by Hank Volpe Note: This material is copyrighted 1990 by Hank Volpe. Reprints of this article have appeared in more than 50 newsletters around the country. For more information or comments, please write to; Hank Volpe P.O. Box 43214 Baltimore MD 21236 A Modem Primer -- Part 1 During the next decade we will witness an explosion in the computer field. Computers, accepted now in business, will become commonplace in your home. You might receive your newspaper over your computer, or scan your TV listings, program your household robotics, or do your shopping and banking. Socially this could be a blessing to the elderly and those that we term as "shut-ins". To busy parents trying to juggle careers and kids, this type of automation if properly conceived and executed would be as big a blessing as the VCR and the Microwave oven were during the '80s. The computers that can do this are available now. The computer also needs a gateway, a method into the source of this information and service. That gateway is your telephone. Pioneers in this field now have access to 24 hour a day news, recipes, book reviews, the latest programs, field support for a product, banking, airline reservations and more by using their computer to access a number of databanks. It won't be much longer until everyone will be tied in together, and the use of these services will be an acceptable expense as cable tv and telephone service is now. Making your computer use a telephone line is as simple as using a modem and a software package. Modems have dropped dramatically in price while increasing their speed and features. The new IBM PS/1's come with built-in modems ready to access Prodigy. There will be more machines coming equipped this way soon. Hooking your computer up to a modem can sound a bit scary to a novice. Regular readers of this column know that I try every month to explain some of this technical talk in more understandable terms. The terms are the only intimidating thing about using a computer in the first place. Think back to the first time you got your machine and wondered what a config.sys file was. What I'd like to do this month and for a few others is to explain modem communications from a beginners view. Is everyone already an expert? ------------------------------ Only about 30% of all computer users have a modem, so its save to say that 70% of the people reading this column are novices to more or lesser degrees. A Novice can gather the information necessary to buy a modem by remembering a few buzz words ("Hayes Compatible, External or Internal, COM1 or COM2, 2400 bps"). The question I raise is does that really make a person feel comfortable or confident to use a modem after it is installed in his or her computer? Where does the confidence come from? How can it be gained? These questions are as important to a beginner as is the type of modem you want to buy. Unlike the actual device, you won't find confidence in a catalog, but like the actual device, it does have a price-tag; that is awareness and experience. Without paying this price, you might learn how to functionally use a modem, but you will never become a "digi-master". How many of you have Microwave ovens? Do you use it for cooking or do you just use it to "heat-up" leftovers? The analogy between the Microwave oven and modems is about the same. You can learn how to "zap" food for 20 seconds and be happy, or you can learn to use the Microwave oven like a chef does. In either case, you are using the oven, but if you are a "chef-master" you can do things that build on your confidence to use this Microwave oven to the best of its potential, thus saving time and getting full dollar back for your investment. Same thing with a computer and a modem. When you become a "digi-master" you can use your computer for things that others might think were impossible to do, thus building your confidence and saving time , which means getting the full dollar out of your computer investment too! Can you become a "beginner?" ---------------------------- Everyone in this life was a beginner at one time or another. Those that have become "experts" have done so only after they have become aware of what they wish to do and have gathered the experience by doing what they wish to do. As we grow older and leave school, we begin to believe that we are no longer beginners. In fact, admitting that you don't know or understand something is almost a sin in our work place. We carry this over to other areas of our lives too. After a certain age, we won't learn something new because we feel uncomfortable with being classified a "beginner". The problem though is that if we don't become a beginner at something, we will never become an expert. Whether the person is a great gardener, a superb chef, or a computer teckkie, at one time they decided to forget about something as silly as pride and devote their time to becoming a beginner. Doing this is not as difficult as you think it is. In fact, if you need examples, go over to a playground one day and watch the 3 year old's learn how to go down a slide. One of the best parts about my job is that I get to meet some really interesting people and to have some time alone to talk to them. Over the years I've been fortunate enough to talk to some people that I admired for one reason or another. Two people though that made the biggest impression on me were Carl Sagan and Clifford Stoll. Its interesting that both of these men are astronomers by profession. Most people know of Carl Sagan by his books and his famous "Cosmos" series. Dr. Sagans' writings, his television work, the causes he supports and his concerns are well know to many of you. There is much to admire about him, especially his approach to us who do not understand all that he does. Many people however don't know that much about Clifford Stoll, but both men have the right idea when it comes to examining something that is unknown or appears incomprehensible; they react with the wonder and curiosity of a child. Cliff Stoll has become famous in the computer world for his book about cracking the KGB's infiltration of the US Government Computer Network in "The Cuckoos Nest". Some of you may have seen him on TV. He bounces up and down, his expressions are wide, open and childlike. Some of the "adults" I know think he is a "looney-tune". Last summer I spent about 2 hours with Cliff Stoll showing him around the place I work. As I explained the workings of several computer systems he listened very intently. When I showed him our satellite delivery system, he asked so many questions that I had trouble keeping the answers coming, and then it hit me! He was becoming more and more excited as he understood each answer. At times his enthusiasm would burst out to the surface or he would laugh the type of laugh you would expect when a blind man discovers that he wasn't blind after all but instead he had been wearing a hat that was too big! This excitement reminded me of my young daughter when she first mastered one of the educational games we bought her. Cliff Stoll has a beginners mind. It isn't clouded by adult filters like, "what did this cost?" or "what purpose is there in this?". He delights in learning something new and derives so much pleasure from this that he doesn't need to worry about what people will say about him. Instead he, like Carl Sagan, reacts to new things and new information with awe, with a beginner's mind. If you wish to learn anything of value, follow the lead of these men and accept a beginners view. Modem 101 - What is a Modem? --------------------------- Well now that we have had our philosophy lesson for this month, lets move on with greater awareness and a beginners mind to tackle this modem problem from the beginning. We all agree now that we really want to learn about modems and we are not afraid to ask questions. We've also agreed that we are going to forget all the filters and fears our adult mind has placed on this subject and become as aware about what a modem does as we can. So, lets start with some fundamentals about why we need a modem in the first place from a technical point of view. Everyone takes the telephone for granted. Maybe its because we've all more or less grown up during a period of time when telephone communications were considered an essential part of our daily lives. The home consumer telephone is a very old technology. Most of our Grandparents weren't even born when it was invented. A telephone takes an electric current and passes it through a microphone made of carbon. Pressure waves from the sound of your voice push on the carbon and change it's resistance. When the electrical resistance of the carbon changes, so does the electrical current. These electrical current changes are carried over wires and switching networks to the person you are talking to where an earpiece turns this varying electrical current back into sound waves. After our nation became wired by the telephone companies, it became desirable to make our machines and remote devices "talk" to one another over this telephone system. The problem though with using a computer on a telephone line directly is twofold; First, computers deal in on-off pulses while a phone line deals in audio frequencies (voice or sound waves). Second, in order to get computer information to move faster, you must turn these on-off pulses on or off faster. Faster on-off pulses is the same thing as saying you want to increase the frequency of these pulses. A typical voice has audio frequencies in the range of 100 to perhaps 3000 frequency vibrations per second (called Hertz after Heinrich Hertz, an electromagnetic pioneer). To get meaningful computer communications, you would need to turn those pulses on and off thousands of times a second. Directly connected computers could not change the current flow this fast on a phone circuit and get reliable transmissions of information. Add to this the fact that there are losses in signal level that happen with the amount of cable you use and that the telephone system basically does not like digital pulses and you come to an inevitable conclusion; Either another way has to be employed, or you cannot use a telephone for connecting computers together. The approach that was taken (as far as this discussion is concerned) transformed these on-off digital pulses into audio tones. The telephone system has no problems with audio tones, it was designed to carry audio from place to place. So, a method was invented to perform this transformation. The on-off computer pulses changed the frequency of an audio tone. One frequency was used for off, one frequency used for on. Therefore, it could be said that the on- off pulses were "modulating" an audio tone. At the other end of the phone, another device would change these varying audio tones back to on-off pulses for the computer to use. This conversion method is the opposite of modulating and is called demodulation. A device that Modulates and Demodulates was called a MO(dulator)/DEM(odulator) or Modem. The method of changing the frequency of the audio tones to represent on-off pulses (or 1's and 0's if you prefer) is called FSK or Frequency Shift Keying. The accepted 300 baud standard was proposed by the Bell Telephone company and assigned the mnemonic Bell 103A. An on pulse (or 1) shifted the audio tone 200 hz (hertz) higher than an off pulse (or 0). To allow 2 way communication on a single phone line, you need to have two different carrier tones (a carrier tone is the tone in its un- modulated state). Furthermore, because the telephone only works up to frequencies of 3000 hz reliably, it was necessary for these carrier tones to be within this range. 1070 hz was picked for the transmit carrier and 2025 hz was picked for the receive in what is called the originate mode (or in other words, when you call out and originate a call. Obviously the answering modem has to flip this around or nothing would work). I know some of this is getting a bit technical, however the really important thing here is this; Computer on-off pulses become audio tones, and audio tones travel over the phone lines. Modems are the devices that turn on-off pulses into audio tones and convert them back again at the receiving end of the phone line. The rate at which these pulses change is called the "baud" rate. 300 baud transmits 300 changes a second, or with a typical PC using a 10 bit (8 bits, 1 Start, 1 stop) character, 30 characters per second. 1200 bps is actually 600 baud. 2400 bps is actually 600 baud. Confused? Well, in another article I'll explain what's going on, but for now the best explanation is that 600 modulation changes is about all you can do in the bandwidth (frequency range) of a phone. Clever modulation methods that change the phase of the carrier, change the phase and the amplitude, change the frequency, the phase and the amplitude and other propriety systems can send 2400, 9600 or more on-off changes a second, but still keep the modulation changes happening at 600 baud. Anything over 300 baud properly is referred to by BPS (or bits per second). So, 2400 baud is incorrect in the PC world (although everyone says it). It's actually 2400 bps, or 9600 bps. These methods I mentioned briefly above make it possible for today's modems to work at 9600 bps and higher on standard telephone lines. The greatest part about this is that telephone communication is relatively cheap. No special gear, interface equipment, or "conditioned" lines are necessary. Each Modem comes with a ringer-equivalency just like your extension phone. A Modem is really that simple to use and understand. Modem 102 - What is a UART? --------------------------- Is it UART or Uart? Beats me, because my spell checker accepts both, and its in print form as UART, Uart, USART, Serial Port, Comm Port, Communications Port. It sure has a lot of names for such a simple device. A UART is a Universal Asynchronous Receiver Transmitter. That simply means, it is a device that takes data from your computer, places it in a serial (one after the other) stream that can be sent over a single wire pair to another computer or another device. If it stayed in the format the machine uses, you would need 8 wires and several control wires to carry the same signal. So, by serializing, you save cable wiring (size) and cable connector size. A serial cable can use as little as 4 pins. The Uart (notice I can't decide which is correct either) is a chip that performs this function. A computer parallel- feeds its data to it, and it marches the data out over a wire in a serial manner to another Uart which then turns the data back to its full 8-bit wide path for use in another computer. A Serial Port is a device that uses a Uart. A Uart by itself does nothing without some controlling logic and a connection to the computer bus. A Serial Port , sometimes called a Comm Port (Communications Port) refers to the complete serial device. In a PC type computer, there are usually 2 serial ports called COM1 and COM2. Most IBM AT compatible computers come with 1 built in serial port. The original XT's and PC's came with none. A PC type modem is a serial device. If you buy an internal, it takes the place of one of your serial ports (plus uses one of your expansion cards). If you buy an external, then you need to have at least 1 working serial port in your computer and a data cable to connect your serial port to the modem. Internals do not need the cable because they connect, via the expansion slot you've selected, directly to the computer bus. They do contain a Uart as part of their hardware connection to the computer bus and this Uart will use one of the Comm Port assignments that the PC reserves for either COM1 or COM2. What you need to know here is this; First, serial ports are used because they cut down on the physical size requirements needed to hook a computer up to a modem. Second, you must have a serial port in your computer in order to use an external modem or you must have a free allocation for a serial port to use an internal modem. Third, no one really knows if its Uart or UART. Recess time ----------- That's about it for this month. Next month, we'll go to the sophomore level and talk about what exactly is a "Hayes" modem, how to use initialization strings, serial cables, internal vs external modems, and handshaking signals.