Projects   /   Development Boards & Kits

PIC16C54 dual dice electronic project circuit

An electronic dice project circuit can be designed in various modes , using logic circuit or using microcontrollers .

Published

At a glance

CategoryDevelopment Boards & Kits
IncludesCircuit diagram
Reading time~3 min

Summary of PIC16C54 dual dice electronic project circuit

This project is a dual electronic dice built around a PIC16C54 microcontroller driving two 7-segment LED displays. It uses few external components, runs from a 5V supply (optionally from a 9V battery plus a 5V regulator), and detects a button press on RA0 to trigger dice rolls. The PIC uses its internal RC oscillator, limited-current resistors for the displays, and simple pull-ups and resets for reliable operation.

Parts used in the PIC16C54 Dual Dice:

  • PIC16C54 microcontroller
  • Two 7-segment LED displays
  • 150 ohm resistor (R1) for display current limiting
  • 10K resistor (R3) for RC oscillator
  • 330 pF capacitor (C2) for RC oscillator
  • Pull-up resistor (R4) for input RA0
  • Momentary push switch for RA0 input
  • 5V three-terminal voltage regulator (optional, when using 9V battery)
  • 9V battery (optional) or 5V DC power supply
  • Decoupling and wiring components as required (wires, PCB or breadboard)

An electronic dice project circuit can be designed in various modes , using logic circuit or using microcontrollers . This electronic project is based on the PIC16C54 microcontroller , manufactured by Microchip . This project is a simple dual dice electronic project , that use few external electronic parts and LED displays , to generate ( simulate ) dices .PIC16C54 dual dice electronic project circuit

As you can see in the schematic circuit , the main advantage of this electronic dice project is that this circuit require few external electronic parts ( like many of the microcontroller based projects ) .

The circuit needs to be powered from a 5 volts DC power supply circuit , but you can use a 9 volts battery and a 5 volt three terminal regulator ( connected like in this circuit diagram ) .
 There are two I/O ports in the 16C54; one 8 bit & the other 4 bit. The 8 bit port, Port B, is connected to the 7 segment display. Three pins of the 4 bit Port A are used and the other pin is tied high. Pin 4 of the PIC is also tied high to give a power-on reset.

A 150R resistor acts as a current limiting resistor for each display. PIC ports have a maximum sourcing current of 40mA ( the maximum current for the LED display is 200mA so it is the PIC that R1 is protecting, not the display.)PIC16C54 dual dice electronic project circuit schematic

The PIC uses its internal RC clock oscillator option (with the 10K resistor, R3, and the 330pF capacitor, C2) and runs at about 330kHz. The switch is connected to input RA0. Normally this line is pulled high via R4 to +5V, but when the switch is closed the input is pulled low. The software detects the falling edge as a dice roll.
You can download souce code for this electronic project following this link
  • What microcontroller is used in this electronic dice project?
    The project uses the PIC16C54 microcontroller manufactured by Microchip.
  • How are the two dice values displayed?
    Two 7-segment LED displays driven from the PIC16C54 show the dice values.
  • What powers the circuit?
    The circuit requires a 5 volt DC power supply, or a 9 volt battery with a 5 volt three-terminal regulator.
  • How is the dice roll triggered?
    A momentary switch connected to input RA0 is used; the software detects the falling edge when the switch is pressed.
  • Which PIC ports are used for the displays and inputs?
    Port B (8-bit) is connected to the 7-segment displays; Port A (4-bit) uses three pins for inputs with one pin tied high.
  • What oscillator option does the PIC use?
    The PIC uses its internal RC clock oscillator with a 10K resistor and a 330 pF capacitor, running at about 330 kHz.
  • Why is a 150 ohm resistor used for each display?
    Each 150 ohm resistor limits current to protect the PIC ports, which have a maximum sourcing current of 40 mA.
  • Is there a reset connection in the circuit?
    Yes, Pin 4 of the PIC is tied high to provide a power-on reset.
Development Boards & Kits · PIC18F4520

Voltage Measurement with A PIC Microcontroller

Voltage Measurement with PIC Microcontroller articulates a methodical framework for facilitating analog voltage measurement using the PIC18F4520, an advanced member of Microchip’s...

Development Boards & Kits

Ultra-Low Power: Microcontroller Standby Current to 130uA with OPEnS Power Control Board

At the OPEnS Lab, a key focus for our projects is achieving exceptionally long battery life. This was particularly true for the...

Development Boards & Kits

An Integrated Approach to Developing Applications with Microchip PIC Microcontrollers

1. Introduction In our daily lives, a variety of devices such as telephones, household appliances, and cars incorporate "smart" electronics, typically manifested...

Development Boards & Kits

Microcontroller-Driven AC Voltage Control with Soft Start Feature

1. INTRODUCTION PWM-based AC voltage controllers find extensive application in uninterruptible power supplies (UPS) and high-power flexible AC transmission systems. This variable...

Development Boards & Kits

PIC Microcontroller-Based IC Tester for Efficient Integrated Circuit Verification

1. INTRODUCTION Within the electronics industry[1], as circuit complexity undergoes a drastic increase and the demand for higher reliability rises, a significant...

Development Boards & Kits · PIC16F887

Hands-On Microcontroller Projects: BK300 Development Board Featuring PIC16F887 Chip Lab

1. INTRODUCTION The study of microcontroller systems is experiencing a global surge across various fields within science, engineering, and technology departments of...

Ibrar Ayyub

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...