B15SKYLINE
The task
P0 is a PWM pin into R1 and C1, so its duty sets the level on CH1.
P1 ticks every 40 cycles. On each tick, step CH1 to the next level of a skyline:
1 volt, then 4, then 2, then 3, and repeat.
The board
- Resistors
- R1 1 kΩ
- Capacitors
- C1 1 µF
- Probes
- CH1
Key idea
A duty of 20 percent gives 1 volt on the 5 volt supply.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Sleep on P1, then set the duty for the next level.
Hint 2Show
Four blocks of three lines: IN P1, MOV A with the duty, OUT P0.
Solution
Reveal the Full SolutionThe complete program for SKYLINE. 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 levels, one per tick.
u1SC-2 standard
IN P1
MOV A, 20
OUT P0
IN P1
MOV A, 80
OUT P0
IN P1
MOV A, 40
OUT P0
IN P1
MOV A, 60
OUT P0- CYCLES
- 34
- at par
- ENERGY
- 68
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 12
- at par