Tag · protocol engine Chapter 17 of 21
FM0 / Miller Line Encoder
Turning data bits into a switching pattern for the backscatter modulator
What it is physically
A tiny block of combinational logic — perhaps 20–40 gates — that takes a serial data bit and the current output state, and produces the next output state according to the FM0 (or Miller) encoding rules. It is clocked by the ring oscillator at the backscatter link frequency (BLF), which the reader specifies in its Query command.
The output is a single digital wire that drives the gate of the backscatter MOSFET. High = MOSFET on = antenna shorted. Low = MOSFET off = normal impedance.
What it does — FM0 rules
FM0 (also called "bi-phase space") has exactly two rules:
- Rule 1: The output ALWAYS transitions (high→low or low→high) at every bit boundary.
- Rule 2: For a data '0', there is an ADDITIONAL transition at the mid-bit point. For a data '1', there is NO mid-bit transition.
So '1' = one level for the full bit period (but transitions at boundaries). '0' = level changes halfway through. This guarantees at least one transition per bit, which helps the receiver recover the clock.
Miller encoding (alternative)
Miller encoding with subcarrier M is the alternative the reader can request for noisier environments:
- Miller-2: Each bit is 2 subcarrier cycles. '1' has a phase inversion at mid-bit; '0' does not. Runs at half the data rate of FM0 for the same BLF.
- Miller-4, Miller-8: 4 or 8 subcarrier cycles per bit. Even slower but much more robust to interference.
The tradeoff: FM0 is fastest (highest throughput), Miller-8 is most robust (best range and noise immunity) but slowest. The reader picks based on the environment.
Why it matters
- Raw NRZ data (just high/low for 1/0) has no guaranteed transitions — long runs of 1s would have no edges, making clock recovery impossible
- FM0 guarantees ≥1 transition per bit period, so the receiver can track timing even with a drifty tag oscillator
- The preamble uses a specific FM0 violation to mark the start of a packet — the receiver looks for this unique pattern
- Spectral properties: FM0 has most energy near the BLF; Miller concentrates energy at the subcarrier frequency, away from the DC carrier — reducing self-interference
Typical values
- BLF (backscatter link frequency): 40 kHz to 640 kHz, set by the reader's DR and Tari parameters
- Common BLF: 250 kHz (data rate = 250 kbps with FM0)
- Bit period: 1/BLF = 1.56 µs to 25 µs
- FM0 preamble: 1,0,1,0,1,1 + v (violation: no boundary transition) — 6+ symbols
- Encoding latency: essentially zero — combinational logic, one gate delay (~1 ns)
How it connects to the next stage
The encoder's single-bit output wire goes directly to the gate of the backscatter MOSFET. When the encoder output is high, the MOSFET turns on and shorts the antenna pads. When low, the MOSFET is off and the antenna sees the chip's normal impedance.
The pattern of switching IS the data. The reader will look at the reflected wave's amplitude/phase changes and decode the FM0 pattern back into bits.
Signal flow
Input: Serial data bits from the state machine (EPC bits, CRC, etc.) at the BLF clock rate.
Output: FM0-encoded square wave on a single wire → gate of the backscatter MOSFET. The waveform has transitions at every bit boundary, plus mid-bit transitions for '0' bits. This wire toggles at up to 2×BLF = 1.28 MHz (trivial for CMOS logic).