Chapter IV Modulation I hate walking into a Company and telling the receptionist that I am here to install a modem. They get on the phone and say "there is someone here to install a motor" "There's someone here to install something" Modems have made great strides recently into the average persons vocabularly, but it is still far from being as a familiar word as is the computer. MODEM from the Lantin words Modicus Membrane OK, so I lied. My real ambitions was to be a brain surgeon but as a kid my parents would not let me play with scaples. Anyway, the term modem comes from the words MOdulate - DEModulate A modem has two principle elements. A transmitter and a receiver. The job of the tranmitter is to take the Transmit Data from the computer in its Digital form and modulate it into an Analog signal that is capable of being tranmitted over a phone line. The receiver, accepts an incoming Analog signal from the phone line which was sent by another modem. It demodulates the information from the analog signal converting it back to the digital form the computer wants to see. In layman's terms : the modem is an interface device converting signals the computer likes to see into signals the phone company likes to see. MODEM in its simplest form ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ ÚÄÄÄ¿ ÚÄÄÄ¿ ³ C ³ ³ I ³ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ I ³ ³ O ³ ³ n ³ ÚÄij Modulator ³ÄÄij n ³ÄijÄÄÄ T M TX data ³ ³ t ³  ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ t ³ ³ E P ÄÄÄÄÄÄÅÄij e ³ÄÙ ³ e ³ ³ L U ³ ³ r ³ ³ r ³ ³ C T Rcv data ³ ³ f ³ ³ f ³ ³ O E ÄÄÄÄÄÅÄÄij a ³Ä¿ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ a ³ ³ R ³ ³ c ³ Àij De-Modulator³ÄÄij c ³ÄijÄÄÄÄÄ L ³ ³ e ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ e ³ ³ I ³ ÀÄÄÄÙ ÀÄÄÄÙ ³ N ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ E Obviously the modem is a great deal more complicated than the above picture. But in basic terms, that is what a modem is. Two terms you will run into ever more infrequently are Mark and Space a MARK is the condition of the modem transmitter that emits a "1" bit. a SPACE is a condition of the modem transmitter that emits a "0" bit. These two terms are holdovers from the teletype era. OK first let us start with 300bps. Most modulation at 300bps is FSK (frequency shift keying), this may have come from ham radio operation like CW continuous Wave. What they do is have 2 oscillators inside the modem, running at two different frequencies. One frequency is used to send a "1" bit while the other frequency is used to send the "0" bit. The transmitter simply shifts back and forth between the two frequncies depending on if it wants to send a 1 or 0. At 300 bps (bits per second), 1 bit takes .00333 seconds to send. The modulator shifts to the desired frequncy and allows it to be transmitted out for 1 bit time. If the next bit is the same as the first, ( a 1 followed by a 1), the same frequency is transmitted for another bit time. If the next bit is different, ( a 1 followed by a 0 ), then the tranmitter shifts to the other frequency for one bit time. And on and on. The term BAUD is used here. BAUD is a unit of signalling speed equal to the number of discrete conditions or signal events per second. It has little to do (at 300 BPS) with the frequency of the oscillators that generate the "1"'s and "0"'s. In this case, BAUD represents the number of times we can shift back and forth between the frequency that represents a "1" and the frequency that represents a "0". ------------------------------------------------------------------ Bear in mind that for each hookup (telephone call) someone originated the call and someone answered the call. ------------------------------------------------------------------ Our first semi standard will be the 103 type modem. 300 bps, FSK Modulation. The originating modem transmits a MARK or "1" using 1270 HZ a SPACE or "0" using 1070 HZ The Auto Answered Modem transmits a MARK or "1" using 2225 HZ a SPACE or "0" using 2025 HZ Modem Modem originated call Answered Call ÚÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄÄÄÄÄ¿ ³ TX ³--- "1" 1270 HZ --------³ Rec ³ ³ ³ "0" 1070 HZ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ ³ Rec ³--- "1" 2225 HZ --------³ Tx ³ ³ ³ "0" 2025 HZ ³ ³ ÀÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÄÙ NEXT.......... The 212A Modem and compatibles......... 1200 Bps (bits per second) 4 Level PSK (Phase Shift Keying) Unlike the 300 bps modem that used two frequencies to tranmit its 1's and 0's, the 1200 pbs modem uses PSK. The tranmitter needs only one frequency. 5.1 Phase Modulation from a Laymans view The laymans way of Understanding Phase Modulation. The moon. It starts out as a new moon, builds to a quarter moon, half moon, 3/4 moon, full moon and then gradually back down to near (but not quite) darkness only to recycle again. Each one of parts of the moon's cycle is considered a "PHASE" of the moons growth to fullness and return to near darkness. Well what would happen if the moon started out small, built to a 1/4, then 1/2 then 3/4 then full moon BUT the very next day, when you would expect to see the moon every so slowly begin its decline, you instead see a new moon on its way back. The PHASE of the moon you expected to see was suddenly replaced by a different PHASE of the moons developement. You would say, something has happened here, something is different. This difference is information. The difference between say a 1 and a 0. IF each time the moon is suppose to be a new moon, it actually starts somewhere else in the cycle or starts at a different PHASE, we can assign this difference with a meaning. Example - You could restart at the 1/4 moon. Or restart at the 1/2 moon or the 3/4 moon. Each starting point representing differing information. By starting the cycle at the New Moon PHASE it could stand for 00 By starting the cycle at the 1/4 Moon PHASE it could stand for 01 By starting the cycle at the 1/2 Moon PHASE it could stand for 10 By starting the cycle at the 3/4 Moon PHASE it could stand for 11 By using this approach, we can represent 2 data bits per moon cycle. Or if we want to get technical 2 bits per baud. A baud is the unit of change. In this case the moons full cycle is one baud. By getting 2 bits of information out of one moon cycle, we have 2 bits per baud. We will discuss more on baud later. 5.2 Phase Modulation from the Technical Side Before I get into the Technical Version of Phase Modulation lets get a few common principles down. The following pictures are graphs, which display and occurence. This occurence is the presence and changes of voltage levels over a period of time. The change levels are displayed vertically while time is rep- resented horizontally. If we looked at a wave form on a graph, we would see this........ B V ³ . . . . o 6v ³ . . . . l ³ . . . . t 4v ³ . . . . a ³ . . . . g 2v ³ . . . . e ³. . C E . . 0v ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³A . . -2v ³ . . ³ . . -4v ³ . . ³ . . -6v ³ . . ³ . . ³ D ³ ------------------------------------------------- Time -- 0 2 4 6 8 9 1 1 in 0 7 milliseconds Here we have a pictorial of a sine wave (minus the curves). Notice the sinewave begins at 0 volts and at time ZERO. As we count off time in milliseconds, the voltage level is changing. It increases until it reaches point B, its most positive voltage. It then begins to decline until it reaches ZERO volts at point C and then begins a further decline to a negative maximum voltage at point D and then begins its return to point E. From point A to Point E is one complete cycle of this waveform and then it will begin to repeat itself, from its starting point. If the second complete waveform is the same as the first, and the third is the same as the second, we call this a Continuous Wave. But what if the second waveform is different than the first. Same type of waveform, just that it starts in a different PHASE of the cycle. B D ³ . . . . 6v ³ . . . . ³ . . . . 4v ³ . . . . ³ . . . . 2v ³ . . . . ³. . C E C . . 0v ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³A . . . . E 2v ³ . . . . ³ . . . . 4v ³ . . . . ³ . . . . 6v ³ . . . . ³ . . . . ³ D B ³ The first cycle runs its course ending at E, the second cycle starts but instead of what we expected, we see the waveform has started at a different part in its cycle, "BUT it still must complete of full swing in both directions and end where it started As you can see, we NOW have 2 cycles, that are the same in their method of progress, but different in the PHASE of where they start and where they finish. To sine waves out of Phase with each other. If we were to start any NEW wave at anyone of the points I marked A,B,C, or D (E is the same as A) we would have 4 different waveforms each starting at a different Phase and thus each being able to represent 4 different pieces of information. Normally, we believe we can only send one piece of data per change of something, as in FSK, it was a change from one frequency to another. Here we are able to change the Phase of the wave by starting it at a different PHASE of its development, Since we have plotted 4 important points from where the waveform may start, we can send 4 different pieces of information via two data bits. WATCH !!!!! B ³ . . ³ . . ³ . . ³ . . ³ . . Let This Waveform ³ . . Beginning at the ³. . C E First Phase represent ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³A . . "00" ³ . . ³ . . ³ . . ³ . . ³ . . ³ . . ³ D ³ Anytime (as above) our waveform starts at point a, we will take this to mean that a 00 has been sent. However when we start our waveform at point B (as below) we will take this too mean a 01 has been sent. B B ³ . . ³ . . ³ . . ³ . . ³ . . Let This Waveform ³ . . Beginning at the ³ . C A . 2nd Phase represent ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³ . . "01" ³ . . ³ . . ³ . . ³ . . ³ . . ³ . . ³ D ³ When the waveform begins at point C we will take this to mean that a "10" has been sent. B ³ . . ³ . . ³ . . ³ . . ³ . . Let This Waveform ³ . . Beginning at the ³C A . .C 3rd Phase represent ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³. . "10" ³ . . ³ . . ³ . . ³ . . ³ . . ³ . . ³ D ³ OR when the waveform starts at point D, we will take this to mean that a 11 has been sent. B ³ . . ³ . . ³ . . ³ . . ³ . . Let This Waveform ³ . . Beginning at the ³ E . . C 4th Phase represent ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³ . . "11" ³ . . ³ . . ³ . . ³ . . ³ . . ³ . . ³D D ³ Two data bits being sent for each one time cycle. Two data bits representing 4 different phases of a cycle. 00 = 1st Phase 01 = 2nd Phase 10 = 3rd Phase 11 = 4th Phase ³ ³ ³ B B B B ³ . . . . . . ³ . . . . . . ³ . . . . . . ³. . C . C A . C A . . ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³A . . . . . . ³ . . . . . . ³ . . . . . . ³ . . . . . . ³ D D D ³ ³ 1st Cycle ³ 2nd Cycle ³ 3rd Cycle ³ ³ ³ ³ ³ ³ "00" ³ "01" ³ "10" ³ Above is a sample of what a Phase Modulated signal would look like if you were watching it on an oscilloscope. Notice where each cycle begins and ends. These 3 cycles would be Demodulated by the receiver as "000110" Six data bits for three waveforms. 2 data bits per waveform. Amazing, not yet, we could, if we wanted to, begin each waveform half way between any of our designated points (A,B.C & D) effectively creating 8 points to start our wave from. C ³ . . ³ . . ³ . . ³ .B .D ³ . . ³ . . ³. .E A ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ³A . . ³ . . ³ . . ³ F . .H ³ . . ³ . . ³ . . ³ G ³ Instead of 4 Phases , if we were to be able to start our wave from any of the 8 points above we would be able to send 8 different messages. In binary, 8 messages can be stated with three data bits, so we now have 3 bits per waveform, 3 bits per cycle or 3 bits per baud (you are going to have to wait until Sunday for the BAUD part) Start at Meaning Point A 000 1st state B 001 2nd C 010 3rd D 011 4th E 100 5th F 101 6th G 110 7th H 111 8th Eight different possible combinations from 3 Data bits, ALL sent by ONE waveform, ONE cycle, ONE baud Well, Phase Shift was alot of material to swallow. But now you have, hopefully, an understanding of how a modem can turn digital data into Analog signals for the Phone Lines. There are other types of Modulation used in modems, such as QAM etc, but since the likely hood of your using a scope to pick out a signal to diagnose a problem is 1 in 1 million, I dont see the need to cover more types of Modulation unless someone requests information on a specific Modulation. I hope it is sufficient to say that different company's use different schemes to modulate signals. These schemes must be the same from one modem to the other if they are to be able to communicate. Whatever you Modulate at this end must be Demodulated at the other end using the same method. One Modem creates an analog signal by using a particular Modulation scheme and sends data across the line. This Modulated Analog signal is what we call CARRIER. When it is present, when the modem is seeing carrier at the receive input, the modem will bring HIGH the CARRIER DETECT signal on our digital interface. 5.3 Intro to Clocking The receiving modem DeModulates the signal removing the Data information AND THE CLOCKING INFORMATION. Remember, it is not enough to know if a piece of Data is a 1 or a 0 but we need to know where one data bit ends and the next one starts. In FSK it was easy as we could control the amount of time we transmitted a particular frequency (one frequency to send a 1 and a different frequency to send a 0 ) But in PSK, as an example, there is only ONE frequency. Inside the modem is an oscillator that operates at 16 times faster than the BPS rate of the modem. Clock = 1 / BPS / 16 or 1/4800/16 or 208 microseconds/16 or 13 micro seconds This clock is not a free running oscillator however, It is kept in sync by training on the incoming received data. To go into more detail would be to start giving a course in electronics. What is important to remember is that the Receiver takes DATA and CLOCKING information from the Receive Carrier. With our new information, our diagram of a Modem now looks a little more complicated. ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ Computer ³ ³ ³ ³ Rec Tx ³ ³ Data Data ³ ÀÄÄÄÄÄÄÄÒÄÄÄÄÄÄÄÄÙ º ÚÄÄÄÄÄÄ×ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³ º - Transmit Data - ³ ³ / \ ÚÄÄÄÄÄÄÄÄÄ¿ ÚÄÄÄÄÄ¿ ³ ³ / \__³ModulatorÃÄÄÄ´ TX ³ ³ ³ ³ ÀÄÄÄÄÂÄÄÄÄÙ ³ ³ ³ ³  ³ ³ ³ ³ÍͳÍÍÍÍÍÍÍÍ Telephone ³ ³ ÉÍÍÍÍÍÏÍÍÍÍÍÍ» ³ ³ ³ ³ D ³ º Oscillator º ³Inter³ ³ Line ³ a ³ ÈÍÍÍÍÍÑÍÍÍÍÍͼ ³Face ³ ³ ³ t ³ ³ ³ ³ ³ ³ a ³ ÚÄÄÄÄÄÄÄÄÄÁÄÄÄÄ¿ ³ ³ ³ ³ ³ ³Clock Recovery³ ³ ³ ³ ³  ³ ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄ´ REC ³ ³ ³ ÀÄÄ´ Demodulator ³ ÀÄÄÄÄÄÙ ³ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ³ ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ The HEART of any Data Transmission Facility is THE CLOCK. The clock keeps all devices involved in SYNC with each other. Should timing information between modems or between modems and computers get out of sync, data will become garbled and useless.