T Flip-Flop Frequency Divider
Toggle flip-flop chain creating frequency division. Learn how T flip-flops divide clock frequencies for timing circuits.
学べること
- Use a T flip-flop in toggle mode to divide a clock by 2.
- Recognize that output frequency = clock frequency / 2 in toggle mode.
- Cascade T flip-flops for division by higher powers of 2.
- Connect this to crystal-based watch and clock circuits.
- Distinguish T from JK and D flip-flops by use case.
仕組み
A T flip-flop ('toggle flip-flop') has a single input T and a clock. When T = 1 and a clock edge arrives, Q flips to its complement. When T = 0, Q holds. With T tied permanently to 1, the flip-flop toggles on every active clock edge — producing an output square wave at exactly half the clock frequency.
This divide-by-2 behaviour is the heart of every binary counter. Cascading N T flip-flops (each clocked by the previous Q) divides the input frequency by 2ⁿ — the cascading ripple counter pattern.
T flip-flops can be built from JK (J=K=T) or D flip-flops (D = T XOR Q). Most cell libraries provide all three primitives; synthesis tools pick whichever maps best to the available cells.
A single T flip-flop's role as a divide-by-2 stage is the simplest possible frequency synthesis primitive. Used in clock generators, watch ICs, audio sample-rate dividers, and any context where you need a slower clock derived from a faster master oscillator.
順を追って試す
上の埋め込み回路で入力を設定し、期待される結果と一致するか確認しましょう。
- 1T = 1 Clock = running at 1 Hz期待値:
Q toggles at 0.5 Hz観察ポイント: Watch the output light blink at half the clock rate. Each clock edge flips Q. - 2T = 1 Clock = running at 100 Hz期待値:
Q toggles at 50 Hz観察ポイント: Faster clock → faster output, but always half. The divide ratio is fixed at 2. - 3T = 0 Clock = running期待値:
Q frozen観察ポイント: T = 0 means hold mode. Clock edges arrive but Q doesn't change. The flip-flop ignores the clock when T is low. - 4Clock = running期待値:
Q toggles only when T was 1 at the edge観察ポイント: Edge-triggered behaviour: T's value matters at the clock edge, not in between. Toggle T while clock is high — no immediate effect; wait for the next edge.
使用コンポーネント
実世界での応用
Watch crystal dividers. A 32.768 kHz watch crystal feeds a 15-stage T flip-flop chain (divide by 2¹⁵ = 32768) to produce a 1 Hz second tick.
Clock domain step-down. A 1 GHz CPU clock can be divided to 500 MHz, 250 MHz, etc. for slower peripheral domains using T flip-flops.
Ripple binary counters. Each bit of a binary counter is a T flip-flop in toggle mode, with the previous bit's Q acting as its clock. Bit 0 toggles every input edge; bit 1 every other; etc.
PWM frequency generation. Audio and motor PWM generators divide the system clock to a target PWM frequency using a T-divider chain.
Test signal generation. Bench signal generators use programmable T-divider chains to produce a wide range of clock frequencies from a single master oscillator.