MC5000_DevKit

An hardware puzzle that teaches the basics of programming.

View on GitHub

home « prev level next level »

Level 5

Clickybright Co. liked your device a lot. Now they want a second product that switches on the light with one button and off with another. So get going!

Specification

Help

Cable connections
  • MCU1_P0 -> Button_1
  • MCU1_P1 -> Button_2
  • MCU1_X0 -> MCU2_X0
  • MCU2_P0 -> Red LED

Hints
  • Use both MC5000 controllers

Solution

MCU1

teq p0 100
- mov 0 dat
+ teq dat 0 
+ mov 1 dat
+ mov 100 x0
teq p1 100
- mov 0 dat
+ teq dat 0 
+ mov 1 dat
+ mov 0 x0

MCU2

mov x0 p0