B65DEAD TIME
The task
P1 and P2 drive the high and low sides of a half bridge. Both on at once shorts the supply.
P0 is the command on CH1: high asks for the high side, low for the low side.
Start on the low side. Sample P0 on each tick of P3.
To switch, turn the side that is on off, wait a tick, then turn the other on.
The board
- Sources
- V1 5 V and V2 5 V square at 31.25 Hz
- Resistors
- R1 330 Ω and R2 330 Ω
- LEDs
- D1 yellow and D2 blue
- Probes
- CH1, CH2, and CH3
Key idea
The tick with both off is the dead time: neither switch turns on before the other is off.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
After JZ falls through, A holds the 1 just read; after JNZ falls through, it holds 0.
Hint 2Show
Low on, wait for high, low off, sleep, high on, wait for low, high off, sleep, and around.
Solution
Reveal the Full SolutionThe complete program for DEAD TIME. 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.
Break before make, with one tick between.
u1SC-2 standard
LO: MOV A, 1
OUT P2
W: IN P3
IN P0
JZ W
SUB 1
OUT P2
IN P3
MOV A, 1
OUT P1
V: IN P3
IN P0
JNZ V
OUT P1
IN P3- CYCLES
- 254
- at par
- ENERGY
- 508
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 15
- at par