D12 · Lesson 3 · An FSK transmitter
Sending bits as two tones, frequency-shift keying with mark and space frequencies, why the phase must carry on smoothly from one bit to the next, the spectrum of continuous-phase FSK, and writing a modulator that turns any bit stream into samples you can play
The simplest way to send bits as sound is to whistle two notes: a low one for 1 and a high one for 0. That's frequency-shift keying, and with tones at 1200 and 2200 Hz it's the Bell 202 standard that carried caller ID and early computer links over phone lines. The subtle part is the switch between notes. Jump to the new tone's own phase and the waveform glitches, splattering energy across the spectrum; carry the phase on smoothly and the signal stays compact. A modulator that does it right is a few lines of code that keep a running phase.
- One byte, B, sent as continuous-phase FSK at 1200 baud: 1 bits at 1200 Hz (one cycle per bit), 0 bits at 2200 Hz.
- The waveform never jumps: each bit starts where the last one left off. Change the byte and watch the tones rearrange.
- Listen to the byte repeating.
Predict
At 1200 baud and 9600 samples per second, how many samples does each bit get, and how many cycles of each tone fit in a bit?
9600/1200 = 8 samples per bit. A bit lasts 1/1200 s, during which 1200 Hz completes exactly 1 cycle and 2200 Hz completes 2200/1200 = 1.83 cycles. Because the space tone ends a bit partway through a cycle, the next bit must start from that phase to avoid a jump.
Name it
Frequency-shift keying
Each bit selects one of two frequencies, mark for 1 and space for 0, for one bit time T = 1/baud. With the modulator keeping a running phase φ,
the waveform is continuous-phase FSK: no jumps, so its spectrum stays concentrated around the two tones.
Spacing and bandwidth
The frequency deviation is half the tone spacing, here (2200 − 1200)/2 = 500 Hz, and the modulation index is = 1000/1200 = 0.83. Carson's rule (D4) puts the bandwidth near . When = 1/2 the scheme is MSK, the narrowest FSK whose tones can still be told apart coherently.
Samples per bit
At samples per second and R baud, each bit gets samples, which must be a whole number for this simple modulator: 9600/1200 = 8.
Worked example
What's the modulation index and approximate bandwidth of 1200 baud FSK with tones at 1200 and 2200 Hz?
Show the solution
- Modulation index. The tones are 1000 Hz apart:
- Carson's rule. The tone spacing plus twice the baud rate:
- Fit the telephone band. That's why Bell 202 fits a telephone line's 300 to 3400 Hz band, just.
Answer h = 0.833, and the bandwidth is about 3400 Hz.
Worked example
At 1200 baud, how many cycles of each Bell 202 tone fit in one bit, and why must the phase be continuous?
Show the solution
- The mark tone. 1200 Hz fits exactly one cycle per bit:
- The space tone. 2200 Hz fits so it ends each bit at a different phase.
- Why the phase must carry on. Restarting the tone at zero phase each bit would make a jump, which spreads energy across the band; a phase accumulator just keeps going.
Answer one cycle of the mark tone and 1.833 cycles of the space tone fit in a bit, so the phase has to run on from bit to bit to avoid jumps that spread energy across the band.
Worked example
At a 9600 Hz sample rate, how many samples are there per bit, and per cycle of the 2200 Hz tone?
Show the solution
- Samples per bit.
- Samples per cycle of the space tone.
- Compare with the sampling limit. That's comfortably above the 2 per cycle that sampling requires, so the tone is well represented.
Answer 8 samples per bit and 4.36 per cycle of the 2200 Hz tone.
Check
Write a continuous-phase FSK modulator.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A modem samples at 9600 Hz and sends 300 baud. How many samples does each bit get?
Check
FSK tones at 1070 and 2200 Hz carry 1200 baud. What's the modulation index?
Check
How many cycles of a 2200 Hz tone fit into one bit at 1200 baud?
Check
FSK uses tones at 1200 and 2100 Hz at 1200 baud.
(a)
What is the modulation index?
(b)
About what bandwidth does Carson's rule give?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
A tone of 2200 Hz is sent at 600 baud and sampled at 48000 Hz.
(a)
How many cycles fit in one bit?
(b)
How many samples per bit?
Explain why
Why should an FSK modulator keep its phase continuous from one bit to the next?
If the modulator switched abruptly to a separate oscillator at the new frequency, the waveform would jump from wherever the old tone was in its cycle to wherever the new one happened to be, and a sudden jump contains a broad spread of frequencies. That splatter widens the signal's spectrum, interferes with neighboring channels and makes the receiver's filters work harder. Keeping a single running phase and only changing how fast it advances means each bit starts exactly where the last one ended, so the waveform stays smooth and its energy stays near the two tones.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.