The Micro_Dice is a simple introduction to the PIC microcontroller. This schematic will produce a random number on the led display in a dice pattern. It is simple to construct.. When constructing you can select either fast roll or slow roll option.
This is a purely digital circuit and this explanation will the terms high and low. In this project with the 6V source, high will indicate a voltage of 5 to 6 volts and low will indicate a voltage below 1 V. There are no alternate states - digital - it is either high or low.
The PIC16F88 has two input/output registers (PORTA, PORTB). By configuring and reading/writing to them, we can achieve complex electronic results without complex electronic construction. In this project we use all 8 pins of PORTB (pins 6, 7, 8, 9, 10, 11, 12, 13 on the pic) and are labelled PORTB.0 to PORTB.7. PORTB.0 is configured as input to detect the PB switch depress. PORTB.1 to PORTB.7 are connected to the LED's through 220R resistors. The LED's are connected to +6V and are illuminated when the respective pin on PORTB is taken low. The dice pattern is produced by encoding the required pattern as 1's and 0's (1 is off, 0 is on).
PORTB.0 is controlled by the 10K resistor to 0V. This keeps PORTB.0 low while the button is not depressed. When the button is pressed, PORTB.0 is taken high by the switch connected to +6V.
We also use PORTA. PORTA.6 is used to control the fast roll / slow roll option. By selecting if it is connected to 0V or +6Vvia the 10K resistor you can select fast roll or slow roll.
This circuit uses the PIC 16F88's internal clock to eliminate the need for external components. The Master Clear (pin 4) of the PIC is taken high through the 4K7 to eliminate any false resets.
Inside a huge PCB factory: https://www.youtube.com/watch?v=_XCznQFV-Mw
News on theme: