Still learning to program in C so although basic, I was pleased with the results. This is my second effort at a code.

A button is pressed which cycles a display of slow rolling dice and initiates a fast cycle dice, When the button is released, the display reveals the outcome of the real fast rolling dice. Since the dice code is counting from 1 to 6 many thousands (million even?) of times a second, the randomness comes from the inability to control the release of the button in sync with a dice throw.

The display shows a row of LEDs however I have had the code working with a 3 x 3 square of LEDs at the top of the board to display like a true dice. This PIC is now programmed so that 7 LEDs will light up as to display a dice face if arranged correctly:

XXX 1XX 1XX 1 X 1 1X1 1X1
X1X XXX X1X XXX X1X 1X1
XXX XX1 XX1 1X1 1X1 1X1

I will hopefully build the circuit soon. The dev board used in this video is an EasyPic5 and the PIC is an old 16F627 programmed and wrote using mikroC Pro free Eval copy.