Clock Divider using a D Flip-Flop

Adapted from the ExpEYES blog “Clock Divider” lab. A 74LS74 D flip-flop toggles on each rising clock edge when $\overline{Q}$ is tied to $D$, halving the input frequency.

1. Aim

To build a ÷2 clock divider with a D flip-flop, observe frequency halving on the oscilloscope, and verify that the output duty cycle is 50% independent of the input duty cycle.


2. Apparatus / Components Required


3. Theory & Principle

With $D$ connected to $\overline{Q}$, each rising edge of CLK latches the complement of the previous $Q$, so $Q$ toggles. Falling edges do nothing in this edge-triggered device.

\[f_{out} = \frac{f_{in}}{2}\]

Because the state spends one full input period HIGH and one LOW in the toggle sequence, $Q$ has 50% duty cycle even if the input square wave does not.

CLR and PRE (active-low) must be held HIGH for normal counting/toggling.


4. Circuit Diagram / Setup

  1. Power 74LS74 from +5 V; common ground with SEELab.
  2. Apply a square wave (e.g. SQ1) to CLK.
  3. Connect $\overline{Q}$ → $D$.
  4. Tie CLR and PRE to +5 V (inactive).
  5. Observe CLK on A1 and $Q$ (or $\overline{Q}$) on A2.

Clock divider breadboard


5. Procedure

  1. Build the toggle wiring and hold CLR/PRE high.
  2. Set a square clock (try a few kHz).
  3. Confirm $f_{out} \approx f_{in}/2$ from the scope time base or cursors.
  4. Change the input duty cycle (if your SQ source allows) and check that output duty cycle stays ≈ 50%.
  5. Optionally cascade a second flip-flop for ÷4.

Clock divider oscilloscope


6. Observation Table

$f_{in}$ (Hz) Input duty (%) $f_{out}$ (Hz) Output duty (%) $f_{in}/f_{out}$
         
         
         

7. Results and Discussion


8. Precautions

  1. Hold CLR and PRE HIGH; floating async inputs cause erratic resets.
  2. Respect TTL voltage levels; use series resistors if feeding A3.
  3. Power the IC before applying a fast clock if possible.

9. Troubleshooting

Symptom Possible Cause Corrective Action
No toggling CLR/PRE low or floating Tie both to +5 V
Same frequency as clock $D$ not tied to $\overline{Q}$ Check feedback wire
Glitches / metastability Slow/noisy clock edges Use clean SQ from SEELab

10. Viva-Voce Questions

Q1. Why does $D=\overline{Q}$ produce frequency division by 2?

Ans: Each rising edge stores the opposite of the current $Q$, so two edges are needed to return to the original state — one full output period for two clock periods.

Q2. Why is output duty cycle 50%?

Ans: In the toggle sequence, $Q$ is HIGH for one clock period and LOW for the next, independent of how long the clock itself stays HIGH within each period.

Q3. What do CLR and PRE do?

Ans: They asynchronously force $Q$ LOW or HIGH. For free-running division they must be inactive (HIGH on 74LS74).