B94FSK
The task
P1 reads a data bit on CH1. Send it as a tone on P0: fast for a 1, slow for a 0.
On each tick of P2, add 20 to a phase in B for a 1, or 10 for a 0, wrapping at 100.
P0 is high while the phase is 50 or more.
The board
- Sources
- V1 2 V square at 25 Hz and V2 1.2 V square at 62.5 Hz
- Resistors
- R1 330 Ω
- LEDs
- D1 green
- Probes
- CH1 and CH2
Key idea
The step is 10 plus 10 times the bit.
Hints
Each hint goes a step further than the one before. Open them one at a time.
Hint 1Show
This is VCO with the step taken from a bit instead of a knob.
Hint 2Show
IN P2, IN P1, MUL 10, ADD 10, ADD B, MOD 100, MOV B, A, DIV 50, OUT P0.
Solution
Reveal the Full SolutionThe complete program for FSK. 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.
Frequency shift keying from a phase accumulator.
u1SC-2 standard
IN P2
IN P1
MUL 10
ADD 10
ADD B
MOD 100
MOV B, A
DIV 50
OUT P0- CYCLES
- 712
- at par
- ENERGY
- 1424
- at par
- NODES
- 1
- at par
- INSTRUCTIONS
- 9
- at par