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.
3.3. The formula
| CK | RUN | R7 | REL |
|---|---|---|---|
| tick | 0 | — | 0 — stopped |
| tick | 1 | 0 | tick — go |
| tick | 1 | 1 | 0 — 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.
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
RELEASEleg is reconnected fromCKtoREL.
3.6. Check
- Switch the power off and on: the belts are empty, the machines are empty, the line stands still.
- Press R — both displays show 0.
- Switch START on — the shift has begun: a part comes out once a second.
- After 128 seconds the left display stops at 128, and the release stops by itself.
- The line finishes what is inside, and the right display also reaches 128.
| What you look at | What you see |
|---|---|
| START off | the clock ticks, no parts come out |
| left display | stops at 128 and grows no more |
| right display | catches up to 128 |
| source and sink | 128 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)¿No te sale? Algo no funciona →