EC1 based USB powered electronic die

Parts:

1x EC1 SPLat PLC

1x 7 segment common cathode digital display

7x 33 ohm resistors

female header connectors

solder

soldering iron

1x push button (normally open)

Misc. wire

A computer running SPLat/PC, the free SPLat programming environment (IDE)

Step 1: Schematic

EC1 based USB powered electronic die

Step 2: Solder the digital display

EC1 based USB powered electronic die
EC1 based USB powered electronic die

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

EC1 based USB powered electronic die

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

EC1 based USB powered electronic die
EC1 based USB powered electronic die
EC1 based USB powered electronic die

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

EC1 based USB powered electronic die

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)

EC1 based USB powered electronic die

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!

EC1 based USB powered electronic die
dy ins.SPT2 KB
 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel