Introduction: EC1 Based USB Powered Electronic Die
Step 1: Schematic
Step 2: Solder the Digital Display
Lets start by soldering one female header to each of the 7 33 ohm resistors
Now lets solder each resistor to a leg of out display and one more header to the common cathode
Step 3: Solder the Button
This button will act as the trigger to "roll" the dy
Lets solder one header to each terminal, simple enough right?
Step 4: Hook Up Our EC1
Now that everything is soldered lets plug them into our EC1
Making note of the alphanumeric displays pinout connect the headers in order A-G to pins 6-12 on the EC1.
These correspond to outputs 2-8.
Now connect one header from the button to the 0V pin and one to pin 20 (input 1)
Now we are finished connecting things to our EC1 and we can plug it into our PC via USB and connect to it running SPLat./PC
Step 5: Programming
We will need to launch 2 tasks. One for randomization and one to output our selected number to the display
Lets begin with the randomization program
This program loads a number into memory slot 1 and them pauses for 5mS allowing you to press the button in this time. It cycles through this indefinitely and at a speed it would be impossible to time when to press the button.
Step 6: Programming (cont)
The second program takes the moment you press the button and reads what number is stored in memory slot 1 at that time. Then it jumps to the corresponding line to "paint" the number on the digital display and waits for the button to be pressed again to reset the program.
Step 7: You're Done!
Now lets load that program onto the EC1 and play a game of Monopoly!