B47INVERTING
The task
P0 reads a sine wave as a percent of the supply.
Turn it upside down on CH2: put out 100 minus the reading as a PWM duty on P1.
The board
- Sources
- V1 2 V sine at 50 Hz and V2 2.5 V
- Resistors
- R1 1 kΩ
- Capacitors
- C1 1 µF
- Probes
- CH1 and CH2
Key idea
NEG flips the sign of A.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
Minus the reading, plus 100, is 100 minus the reading.
Hint 2Show
A reading of 90 percent becomes a duty of 10 percent.
Solution
Reveal the Full SolutionThe complete program for INVERTING. 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.
Put out 100 minus the reading.
u1SC-2 standard
IN P0
NEG
ADD 100
OUT P1- CYCLES
- 400
- at par
- ENERGY
- 800
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 4
- at par