B57LOW SIDE
The task
M1 is a MOSFET switch. While P0 holds its gate high, M1 connects the LED to ground.
V1 powers the LED, not the chip. P1 ticks every 20 cycles.
Flash short, then long: lit one tick, dark one, lit two, dark two, and repeat.
The board
- Sources
- V1 5 V
- Resistors
- R1 1 kΩ and R2 330 Ω
- LEDs
- D1 green
- Transistors
- M1, an N channel MOSFET
- Probes
- CH1
Key idea
P0 high lights the LED. CH1 sits low while M1 conducts.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Each OUT holds until the next, so the long flash is just one more sleep.
Hint 2Show
Sleep, write 1, sleep, write 0, sleep, write 1, sleep twice, write 0, sleep.
Solution
Reveal the Full SolutionThe complete program for LOW SIDE. 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.
A MOSFET switches the LED's own supply: short, then long.
u1SC-2 standard
IN P1
MOV A, 1
OUT P0
IN P1
MOV A, 0
OUT P0
IN P1
MOV A, 1
OUT P0
IN P1
IN P1
MOV A, 0
OUT P0
IN P1- CYCLES
- 56
- at par
- ENERGY
- 112
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 14
- at par