B68TRACKER
The task
P0 reads a target on CH1. P1 charges C1 through R1, and P2 reads C1 back.
On each tick of P3, raise P1 while C1 is below the target and lower it otherwise.
CH2 follows CH1.
The board
- Sources
- V1 1.2 V triangle at 10 Hz and V2 2.5 V
- Resistors
- R1 22 kΩ
- Capacitors
- C1 1 µF
- Probes
- CH1 and CH2
Key idea
Subtract C1's reading from the target: a positive result means C1 needs more charge.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Any nonzero value drives a digital pin high, so a positive difference can go straight out.
Hint 2Show
IN P3, IN P2, MOV B, A, IN P0, SUB B, then JG past a MOV A, 0 to OUT P1.
Solution
Reveal the Full SolutionThe complete program for TRACKER. 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.
Charge while C1 is below the target.
u1SC-2 standard
IN P3
IN P2
MOV B, A
IN P0
SUB B
JG H
MOV A, 0
H: OUT P1- CYCLES
- 618
- at par
- ENERGY
- 1236
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 8
- at par