Various PIC Projects


Here we list some fun projects one can do with 8-bit PIC microcontrollers. For instructions on how to program the chip using the PicKit2 for the various projects, see pprogs.html .

Kitchen Timer

The kitchen timer is a timer that allows one to set the time in minutes up to 63 minutes. When the time is up, a buzzer goes off. We use the PIC16f690 microcontroller. The remaining time is displayed in binary format using LED's. There are 6 LED's for the minutes (pins 14-19), and 5 LED's for the seconds (pins 2,3,5,6,7). Pin 11 is connected to the buzzer. Pin 10 is connected to a button that allows the user to add a minute to the timer.
One can construct the timer
by placing the components
onto a solderless breadboard,
or by soldering the components
onto a perf-board. The connections
are shown in the figure to the right:

For the seconds, the most-significant-bit is pin 7, and for the minutes the most-significant-bit is pin 14. The second LED's count up to 30 then back down to zero in binary. The timer starts out at one minute, and one can push the button to add more minutes to the timer. Click here to see a parts list .

The assembly code for the timer is kitimer2.asm . The minutes are displayed in binary on pins 19 -> 14, with the lowest significant bit being pin 19. The seconds are displayed on pins 7,6,5,3,2, with the lowest significant bit being 2. The 10k Ohm resistor on pin 10 is used as a "pull-up" resistor for the button. When the button is pressed, pin 10 is grounded yielding a "zero".

Sport Timer

The sport timer produces "beeps" every minute that indicate how many minutes have elapsed. For this project, we use the PIC12F629. The assembly code for the timer is jogtime2.asm . Note: delay2 is the subroutine to delay one minute. For our PIC12F629 chips, the crystal did not advanced the onboard clock by exactly 2 microseconds, so we had to adjust our timing. Be sure to check the timing when programing the PIC12F629.
One can construct the timer
by placing the components
onto a solderless breadboard,
or by soldering the components
onto a perf-board. The connections
are shown in the figure to the right:
Every minute the timer makes 6 "beep" tones with the piezo buzzer. Each tone is either a low note = zero, or a high note = one. Thus, the user will hear 6 consecutive bits. There is a short pause after the first two bits. To convert the 6 bits to the number of minutes, we used a modified binary scheme. The first two bits determine the quarter of the hour. That is 00 is the first quarter, 01 the second quarter (or 15 minutes), 10 the third quarter (or 30 minutes), and 11 is the fourth quarter (45 minutes). The next 4 bits determine the number of minutes past the quarter. For example, 01 1001 would translate to 15 + 9 = 24 minutes. The largest number is 11 1110 and equal to 45 = 14 = 59 minutes. After the 59th minute, the timer starts the cycle over again with 00 0000. When the switch is closed to turn the timer on, the timer beeps 6 low notes, 00 0000, corresponding to zero minutes. Click here to see a parts list .

Siegel's Home Page

Physics Department| College of Science