PIC10F200 based dice

This page describes a PIC10F200-based electronic dice. The reason I made this was that I got a small corner left over when ordering a panel with a couple of other PCBs and thought I would rather use the corner for something fun than leave it unused, so I made a dice. The PCB is quite small, so it is hard to etch yourself even the layout is available in the zip-file if you want to try, so to make it easier for you I’ve made it possible for you to buy PCBs, preprogrammed chips, and of course complete kits from me in my web shop.PIC10F200 based dice

Even though this is a very simple project, it requires some surface mount soldering skills, proper tools, and a steady hand as it is built with surface mounted components only. But it might be a good start if you have experience in hole mounted soldering and want to try surface mount soldering. As you can see in the picture to the right it is possible to make it work even if the soldering looks like crap.

The hardware.

The standard solution for a power supply is to use a 7805 but I could not find any 7805 in a sot-23 or smaller capsule so I used an LP2985 that is available in a 5-pin sot-23 capsule with 5v/150mA output. I use a 100nF cap on both input and output side of the regulator to get rid of noise etc. I’m using a standard 9v battery to supply the circuit. In the PCB-layout there is also a hole for the cable to remove mechanical tension from the soldering point of the cable.

The PIC controlling the dice is a PIC10F20X, but it is also possible to use a PIC10F22X (that is what is sold in my web shop. as it is almost the same price so I use the 10F222 to get fewer chips in stock as other projects use the 10F222), both are microcontrollers with very limited RAM and ROM, 16b/256w of RAM/ROM but there are versions with up to 24b/512w, the 10F22X series also has an ADC but that is not needed in this project. Same .hex-file can be used for both the PIC10F200 and the PIC10F222 as the later is set into compatible mode and only disables the 10F222 specific functions in the beginning of the program which has no effect on a 10F200 chip.PIC10F200 based dice schematic Two of the six pins are used for power supply, there is one reset (or input only) pin and three IO-pins. The switch is connected to the reset pin that is configured as an input. The three IO-pins left is used to drive a 2Γ—2 matrix configuration of the seven LEDs. The LEDs are connected in series and lit in three sets of two LEDs on opposite sides in series and one single LED in the center. The 2Γ—2 matrix configuration is created with three pins only by putting diodes in both directions so when the common line is β€œ0” LEDs are lit by β€œ1” and when the common is β€œ1” LEDs are lit by β€œ0”. This leads to that only two sets of LEDs can be lit at one time, either the LEDs in the corners or the ones in the middle. When changing fast (100Hz) between lighting the different LEDs it look like they are all lit at the same time thanks to the persistence of vision effect. There are of course some resistors in series with the LEDs as the system runs on 5v and the LEDs have a voltage drop of about 2v each.

One nice feature of the PIC10F-series is the current consumption, especially in sleep mode. This removes the need of an on/off switch as the dice only uses 0.4uA in standby, so it can be in standby for many years without discharging the battery.

 

 

For more detail: PIC10F200 based dice


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.