Lesson 3. START and the shift

So far the line starts by itself as soon as the power is on, and releases parts without end. The experiment needs something else: a shift — the same number of parts at the input, a start on command, and a stop by itself. In this lesson a START switch and two chips appear that decide whether the next clock pulse may reach the source.


3.1. Idea: when to release a part

The source releases a part on a rising edge of RELEASE. Right now the clock CK goes there directly. We need the pulse to pass only when:

  • the START switch is on — RUN = 1;
  • the shift is not over yet — fewer than 128 released.

That is an «AND» of three conditions: the clock, START and «not the end of the shift».

3.2. Idea: the end of the shift is one bit

Why 128 and not 100? Because 128 in binary is 1000 0000: it is the first number at which the top bit R7 of the «released» counter lights. While 0…127 are released, R7 = 0; as soon as it is 128 — R7 = 1. So «the shift is still on» is simply NOT R7. No comparisons, no extra chips: the counter itself tells us the shift is over.

RUNCKR7RELreleased01…127128128 = 1000 0000: R7 became 1 — the release stopped by itself
A shift: START opens the release, the 128th part raises R7 — and REL pulses no longer pass. The middle of the shift is skipped.

3.3. The formula

CKRUNR7REL
tick0—0 — stopped
tick10tick — go
tick110 — shift
  • NDONE = NOT R7 — one inverter of the CD4069;
  • CKR = CK AND RUN — the first AND gate of the CD4081;
  • REL = CKR AND NDONE — the second AND gate of the same CD4081.

The source now listens to REL instead of the bare CK: in this lesson its RELEASE leg is reconnected to the new label.

R7CD4069NDONECKRUNCD4081 · JCKRKsourceRELEASERELREL = CK · RUN · NOT R7
Release: the clock reaches the source while START is on and the shift is not over. The end of the shift is the top bit of the «released» counter.

3.4. Idea: what is inside the CD4069 and the CD4081

The CD4069 has six inverters: input A → output G, B → H and so on. We need one: A = R7, G = NDONE. The free inputs B…F go to GND: a CMOS chip's input must never be left «in the air».

The CD4081 has four AND gates: A, B → J; C, D → K; E, F → L; G, H → M. The first two are chained: output J (CKR) goes to input C. The free E…H go to GND.

3.5. Assembly

Insert the lesson with Cmd+I on top of lesson 2 (the text is at the end of the lesson). You get:

  • on the base — the START switch (label RUN);
  • outside — the CD4069 and the CD4081;
  • the source's RELEASE leg is reconnected from CK to REL.

3.6. Check

  1. Switch the power off and on: the belts are empty, the machines are empty, the line stands still.
  2. Press R — both displays show 0.
  3. Switch START on — the shift has begun: a part comes out once a second.
  4. After 128 seconds the left display stops at 128, and the release stops by itself.
  5. The line finishes what is inside, and the right display also reaches 128.
What you look atWhat you see
START offthe clock ticks, no parts come out
left displaystops at 128 and grows no more
right displaycatches up to 128
source and sink128 each

Lesson 3 insert (Cmd+I)

# Lesson 3 — START and the shift. Release = CK · RUN · NOT(R7): the switch starts it, and when "released"# reaches 128 its top bit R7 becomes 1 and closes the gate — the shift is over by itself.# Insert on top of lesson 2. The source now listens to REL instead of the bare clock.input run(RUN)at(run, B, 40, 300)"TI CD4069UB"(A=R7, G=NDONE, B=GND, C=GND, D=GND, E=GND, F=GND)"TI CD4081B"(A=CK, B=RUN, J=CKR, C=CKR, D=NDONE, K=REL, E=GND, F=GND, G=GND, H=GND)reconnect(src.RELEASE = REL)

Stuck? Something doesn't work →