B43THREE PHASE
The task
Three lamps share the ticks of P3. Each is dark one tick in three and lit the other two.
P0 is dark on ticks 3, 6, 9, and so on, P1 a tick before P0, and P2 a tick before P1.
The board
- Resistors
- R1 330 Ω, R2 330 Ω, and R3 330 Ω
- LEDs
- D1 red, D2 yellow, and D3 blue
- Probes
- CH1, CH2, and CH3
Key idea
A lamp lights for any value but 0, so the count MOD 3 lights P0 on two ticks of three.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Adding 1 before the MOD moves the dark tick one place earlier.
Hint 2Show
Keep the running value in A: ADD 1, MOD 3, and OUT for each lamp in turn.
Solution
Reveal the Full SolutionThe complete program for THREE PHASE. Open it only when you want the answer.
The reference program
The game's own solution. It passes every test and scores exactly par on every benchmark.
Each lamp dark one tick in three, staggered.
u1SC-2 standard
IN P3
MOD 3
OUT P0
ADD 1
MOD 3
OUT P1
ADD 1
MOD 3
OUT P2- CYCLES
- 154
- at par
- ENERGY
- 308
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 9
- at par