Ελληνική έκδοση (Greek version)

Electronic Dice

    This page presents a simple circuit that mimics the operation of a dice. The user presses a button and when he releases it. the electronic dice displays an indication that corresponds to one of the six possible faces of a real dice. The selection of the "face" depends on the time the button is pressed, however the change between the indications is so fast that the user cannot "choose" it, so the selection is in fact random! The power supply comes from a 9V battery.

    The schematic of the circuit follows:

    The microcontroller (PIC24FJ16GA002) uses the internal 32KHZ clock. The program that runs into the microcontroller has been written in assembly and is very-very small. The source code has been compiled with MPLAB 7.62 and the hex file has been loaded with the programmer that is described in another page of this site. (Of course any other programmer can be used. The Configuration Words must be set for the internal 32KHZ clock).

The prototype has been constructed in a general purpose board and is shown in the next photograph: