Skip to content
EmbeddedPlayX

Start here

Boot camp

Everything you need before your first mission, in about a minute.

On this page
  1. The mission loop
  2. Start the clock
  3. Writing the program
  4. Reading hex and binary
  5. Register map
  6. What the game simplifies
  7. Try it yourself

The mission loop

  1. 1ConfigureWalk the register rooms and flip the bits.
  2. 2ProgramPPress P to write it into ROM.
  3. 3ExecuteEPress E and watch the CPU run it.
  4. 4RepairRight values: the system comes back.

Inside the chip you walk between rooms, and each room is a register: eight switches (bits) that turn a piece of hardware on, off or into a mode. When you press E, the CPU fetches, decodes and executes your program step by step, and you can watch every value travel. Get every register right and the system comes back.

Start the clock

Nothing in a chip moves without a clock, so every mission begins with OSCCON: switch the internal oscillator on (bit 0, SCS0 = 1) and pick a speed (bits 2:1, IRCF). Any speed wins; the speed only changes how fast the CPU runs your program.

OSCCONClockNote
0x011 MHzslowest run
0x032 MHz
0x054 MHzused in these docs
0x078 MHzfastest run
How 0x05 breaks down
Bit76543210
Value00000101
Field—IRCFSCS0
  • IRCF (bits 2:1) = 10 → 4 MHz
  • SCS0 (bit 0) = 1 → Internal oscillator on
  • Every remaining bit is 0: those bits are not needed for this level, but they must stay clear for the value to match.

Writing the program

Two instructions do everything: MOVLW k loads a value into the working register W, and MOVWF f copies W into the register at address f. One pair per register:

MOVLW 0x05
MOVWF 0x20   ; OSCCON

Reading hex and binary

Registers are 8 bits and written in hex. One hex digit is exactly four bits, and bit 0 is the rightmost. That's all you need.

Need a refresher?
HexUpper digitLower digitBinary
0x050 = 00005 = 01010000 0101
0x494 = 01009 = 10010100 1001
0xFFF = 1111F = 11111111 1111

Bit weights from bit 7 down to bit 0 are 128, 64, 32, 16, 8, 4, 2 and 1.

Register map

Every register in the game and the levels that use it. Full bit details are in the register reference.

AddressRegisterUsed in
0x20OSCCONAll levels
0x21TRISALevel 1
0x22PORTALevel 1
0x23TRISBLevel 1
0x24PORTBLevel 1
0x25ADCON0Level 2
0x26ADCON1Level 2
0x27T0CONLevel 3
0x28T1CONLevel 3
0x29EECON0Level 4
0x2AEECON1Level 4
0x2BTXSTALevel 5
0x2CRCSTALevel 5
0x2DSSPCON0Level 6
0x2ESSPCON1Level 6
0x2FI2CCON0Level 7
0x30I2CCON1Level 7

What the game simplifies

  • You configure, the game feeds the data. Once a peripheral is on, it generates its own demo data (a repeating 0x00 → 0xFF sequence, or the word “EmbeddedPlayX” in EEPROM), so you never write data registers yourself.
  • Slowed down to be seen. Animations run far slower than real hardware so you can follow every bit.

Wrong value?

The peripheral simply doesn't do what the mission needs, so there's no Target Reached. Every mission page has a “Stuck?” list that matches what you see to the fix.

Try it yourself

Build 0x05, the clock every mission starts with:

0 of 1 register match.

OSCCON 0x20

✗ Not yet – 2 bits differ
7–
6–
5–
4–
3–
2IRCF1
1IRCF0
0SCS0

Hex 0x00 Binary 0000 0000 Target 0x05 (0000 0101)

  • IRCF (bits 2:1) = 00 → 1 MHz
  • SCS0 (bit 0) = 0 → Internal oscillator not enabled