HOME  
 
 Home     Projects     Micro     Tools     Delphi     Developer     Site map
   



Digital Clock and Temperature

Update : 1-August-2005
www.sixca.com

This is a digital clock and temperature display which is alernate display between time and temperature.

Feature
- Display time 24-hour format. 00:00 - 23:00
- Use DS1307 RTC with 3V betterry back-up.
- 1 channel temperature sensor(DS1820)
- measures temperatures from -55 to + 125 degree Celsius.
- Temperature accuracy 0.5 'C
- software compiled with CCS C compiler V 3.222


Block diagram

The figure 1. is a block diagram for digital clock and digital thermometer.It consists of 1 temperature sensor, RTC ,Microcontroller(PIC), shift register ,7-segment and key board.The shift register use for expand I/O of CPU becuase it has 13 I/O only for PIC16F826.This shift register is a device contains an 8-bit serial-in, parallel-out shift register that feeds an 8-bit D-type storage register.



Figure 1. Block diagram


Schematic

Figure 2. is the schematic for this project.PIC16F628 used to control all task such read temperature,read RTC from DS1307
convert data to 7-segment code .The detail of power supply not show in the circuit.

Note : you must converting 7-segment pin for two right digits or digit for minute by change Segment A to D, B to E, C to F and so on.

Click to enlarge

Figure 2. schematic


Software

The software for this project program with CCS C compiler V3.222 .Becuaes of there are 2 thing to display on 7-segment so the display alternated for display time and temperature.
Therefore,after power up temperature will displayed first which blinking while display 8 times then back to display time about 10 second and so on.

To setting RTC time there are 3 sw to use
SW1 : use for select hour or minute
SW2 : use for decreate hour or minute
SW3 : use for increate hour or minute

When SW1 was first pressed the minute will blinking you can use SW2 and SW3 to setting minute if need.If SW1 pressed again the hour digit will blinking and if SW1 pressed again there are no digit blink therefore time setting is done.



source code

Other PIC projects

Digital clock and thermometer.PIC base project
3 Channel IR remote control the RC5 protocol IR remote
Control stepping motor via USB interface with PIC18F4550
ICD2 Clone Programmer and debugger for PIC Microcontroller
USB Data Acquisition with PIC18F4550
50 MHz frequency counter with LCD display + PIC16F84


   
Copyright(c) 2005-2010 sixca.com, All rights reserved.
Best view @ 800X600, IE 6.0 up Terms Privacy