Although many circuits for digital clocks have been published in Electronics For You, this circuit is a PIC microcontroller (MCU) based easy-to-construct gadget, which combines a clock with a temperature indicator in the same display. The display uses four 7-segment common-anode LEDs. It shows the clock, and in every minute for five seconds the display alternates to show the temperature in oC. An alarm facility with buzzer is provided.

Clock’s precision is due to the 20MHz high-frequency crystal that is used with PIC16F73 chip. Second display’s decimal point blinks every second. The display for temperature uses three digits from the left and the fourth digit just shows oC. For this, the fourth LED is soldered on the PCB upside-down. This places its decimal-point LED on top-left instead of bottom-right so as to show the symbol of degree (°). Hence, we use four separate common-anode LED units instead of a combo LED display component.

Test PointsThe MCU choice is now for the more convenient PIC chip from the low-cost 16F family. This is a 28-pin chip with ports a, b and c, as well as several internal peripherals like timer, ADC and UART. Most important advantage of PIC is the ease of downloading a program on to the chip, because it uses flash memory and can be programmed with 5V supply. PICkit2 programmer is used for downloading the hexadecimal code on to the chip. Cost of 16F73 is quite low.

Port pins in the PIC chip have greater power capability than those in the 8051 family. So driving LED segments can be made by directly connecting the segments to the port pins, without any buffer IC. Thus, component count is reduced.

There are several analogue-to-digital converter input channels. Speed of conversion is as short as 20 microseconds. So it is easy to connect any analogue signal and digitise the same for displaying with LEDs. Here, the analogue signal is that of temperature.

Texas Instruments chip LM35 is a low-cost temperature sensor and is connected to the analogue input pin of the PIC chip. It can measure temperatures in the range -50°C to 100°C, but in this unit it is mounted on the PCB only to show room temperature.

Circuit explanation

Fig. 1 shows the circuit diagram of the alarm clock-cum-temperature indicator. PIC16F73 IC has its reset on pin 1. A resistor and capacitor junction is tied to this pin to perform reset on applying power. The 5V power supply is obtained from a low-voltage transformer (X1), rectifier (BR1) and voltage regulator IC 7805 (IC1).

Fig. 1 Pic projects: Circuit of the alarm clock-cum-temperature indicator
Fig. 1 Circuit of the alarm clock-cum-temperature indicator

Pin 20 is Vcc and pins 19 and 8 are grounded. Pins 9 and 10 are for connecting a crystal for the oscillator. Any crystal frequency is alright, but it is better to use the highest 20MHz crystal for speed. Two capacitors, each of 15pF, are tied to the end of the crystal to ground. This frequency is called high speed, or HS. There is a configuration register inside the chip, which should be programmed for HS, among other choices, such as XT, RC and LP. The configuration byte we use is 52 hex.



  1. Its not working perfect as mentioned in the article. I made this circuit using bread board and PCB but no time output except temperature. Disappointed.. 🙁

  2. There is only a single switch for setting Time and Alaram . Don’t know whether these switches work in
    Fast Mode or Slow Mode. Unless both modes are given it will be very difficult to set Time.

  3. Have you checked all the test points as listed in the table? If yes, are you getting these voltages. Check proper connections to MCU and displays (DISP1-DISP4). Also make sure the correct polarities of the transistors. Check the oscillation frequency of XTAL1 in oscilloscope.

  4. sir i have checked all the voltage at tp point and connection according to circuit diagram but still no display . when i tuch the pin no 9 then some number show on display and running from right to left.

  5. sir
    i have use extream burner pic programmer please post the correct fuse bit.default fuse bit 3FF1 no0t working . when i use this bit there is no display.

  6. sir,i tried this experiment.It is just showing the counter..and i am unable to understand what is the problem with it?
    i have made the connection on the pcb..also on the breadbard but no use…no counter is shown..n i have programmed it using pickit3…still an issue..
    please reply as soon as possible.i have selected this exeriment as my project.

  7. The programming configuration is done with using 16f72…n ‘v are using 16f73….
    Which ic is to be used?…
    N what extra thing is updated?…


  9. 16F73 AND 16F72 ARE THE SAME. Some programmers do not recognize the 16f72 but recognize the 16f73 you must program 16f73 all the program made in 16f72. We have this problem when we use the Winpic
    Perhaps the problem is that the program indicate the 16f628 and not the 16f73. Look at the asembler files


Please enter your comment!
Please enter your name here