B70BURST
The task
P0 reads a trigger on CH1. On each rising edge, send four pulses on P1.
Each pulse is one tick of P2 high, then one tick low. P2 ticks every 20 cycles.
After the fourth pulse, wait for the next rising edge.
The board
- Sources
- V1 5 V and V2 5 V square at 25 Hz
- Resistors
- R1 330 Ω
- LEDs
- D1 red
- Probes
- CH1 and CH2
Key idea
After a burst the trigger is still high: wait for it to fall before you look for a rise.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Four pulses take eight ticks: high, low, high, low, and so on. Sample P0 on ticks too.
Hint 2Show
Count down from 8 in B and write the count MOD 2 on each tick.
Solution
Reveal the Full SolutionThe complete program for BURST. 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.
Four pulses per rising edge.
u1SC-2 standard
W: IN P2
IN P0
JNZ W
H: IN P2
IN P0
JZ H
MOV A, 8
L: SUB 1
MOV B, A
MOD 2
OUT P1
IN P2
MOV A, B
JNZ L- CYCLES
- 292
- at par
- ENERGY
- 584
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 14
- at par