O'Reilly logo

PIC in Practice, 2nd Edition by David W Smith

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

18

Projects

Project 1 Electronic dice

When using a Microcontroller in a control system the place to start is to decide what hardware you are controlling. In the Electronic Dice we will use 7 LEDs for the display and a push button to make the “throw”. Just to make the dice a little more interesting we will use a buzzer to give an audible indication of the number thrown.

The circuit for the Dice is shown in Figure 18.1, using the 16F818 with its internal 31.25kHz clock. The push button is an input connected to PortA,2. The 7 LEDs are connected to PortB and the buzzer is on A1.

image

Figure 18.1 Circuit diagram for the electronic dice

The truth table ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required