The Digital Die

1 Inputs and Outputs to generate 1-6

Learn It

  • GENIE chips can be programmed with several configurations.
  • We'll need 1 pin to provide power to the chip and 1 pin to tie it to ground.
  • We'll need 1 pin to program the chip.
  • We'll need 1 pin to receive an input.
  • This leaves us with 4 pins to play with.
  • By right clicking on the GENIE chip in Circuit Wizard, we can choose >Program>Program Settings

programChoice.png

  • Make sure you have a C08 chip sellected.
  • Now you can use the check boxes to make different pins inputs or outputs.
  • We're going to want to have as many outputs as possible, so this configuration is probably the best.

1in4out.png

Try It

  • If we want to make a die, we need to be able to represent the numbers 1-6 using LEDs
  • But we can't simply connect an LED to each output pin, as we only have 4 output pins to use.
  • Build the circuit as shown below.

initialCircuit.png

Try It

  • Here's a circuit that allows any number from 1-6 to be displayed by sending output pins high.

arrangement1.png

  • Try to come up with your own arrangement, where we could have any number of LEDs fom 1-6, switch on using only 4 outputs.
  • Screenshot your circuit when you have finished it.

2 A Program for the Die

Try It

  • We're going to use the circuit shown below to program our Die.It's identical to the one before it, but the LEDs have been placed differently.

studentCircuit.png

  • It's a little hard to construct, so you can download it here
  • It might help you to understand how the outputs control the LEDs by using the simulation below.

Badge It - Silver

  • Use the simulation to write down which outputs will need to be set to high for each number the die will generate from 1 through to 6.
  • Using the diagram below and any graphics package you choose, draw a basic diagram to show how the arrangement of LEDs will be connected to the pins of the GENIE chip.

genieChip.png

  • This silver badge progress ladder indigo - Follow a PCB created by a third party, and identify some of the outputs and inputs.

Learn It

  • With this information, you should now be able to create a program to generate the random numbers.
  • You've quite a bit of experience using flowcharts to program GENIE chips already, so here is the start of the flowchart only.

partialProgram.png

Badge It - Gold

  • Use the file you downloaded earlier and your knowledge of which outputs to send high to complete the program and test it to make sure it works.
  • Take a screenshot of your program when you have finished.
  • This gold badge progress ladder yellow - With assistance, write a simple program to manipulate outputs

Badge It - Platinum

  • There are many ways of solving this probems.
  • See if you can come up with an alternative algorithm that doesn't use the Random block.
  • Take a screenshot of your program when it is complete.
  • This platinum badge progress ladder, green - With assistance, write programs to handle inputs in a PIC circuit.