DIGITAL CLOCK with DATe and thermometer on 7x4 segment displays
Project Information

Simple clock/date with temperature based on PIC16F628/PIC16F84 microcontroller and DS18S20/DS18B20 sensor. It supports CC and CA displays. Can be a weekend project, few electronics parts to build.

  • Clock with date and temperature on 4×7 segment display CC or CA
  • Supported chips: PIC16F84(A)/PIC16F628(A)
  • Supported temperature sensors: DS18S20/DS18B20
  • Wide temperature range from -55 up to +120°Celsius
  • Simple circuit: PIC micro, few resistors, 4 transistors, one display
  • Configurable time (in seconds) to display clock, date, temperature
  • Digital adjustment for sync. constant can make the clock +/- 1 second/month
  • Menu with SET, PLUS and MINUS buttons (RESET optional)
  • Memory saved settings to prevent losing in case of power failure
Display hour:minutes.
Display date day:month
Display temperature.
How it works

Running device will iterate through clock-date-temperature screens. Using default settings the clock is set to show for 8 seconds, then the date for 2 seconds and the temperature for 3 seconds. These timings can be adjusted from the menu. User can hide date and temperature screens by setting time to show them to 0 seconds. The temperature is converted in the last second of a previous screen (clock or date) and after each reading.

User can activate settings mode by pressing set button. The following screens will iterate through the device settings. User can set: clock (hours, minutes), date (day, month , year, date type), screens times in seconds (show clock, show date, show temperature) and clock sync constants (low, high). All settings are saved to EEPROM. Clock will start from second 0 on menu exit event. See more in settings section.

The clock can be calibrated through software. This is useful if the clock lost or gain seconds during a period of time. This can happen for various reasons. The idea is to make the second last longer or less. One second lasts 1.000.000 microseconds. This is a big number for my display where I can write only 4 numbers, but if we represent this number in hexadecimal will have this value: F4240. Calibrations means adjusting around 1.000.000 so I dropped F, you cannot set that, but you can adjust 42(Sh) and 40(Sl) from 00 to FF. This gives you a large possibility to adjust your second. For more information please read Clock sync. from documentation (there are also examples included).

Project zip file
  • ASM source code
  • HEX files
  • Eagle png file and sch file
  • Documentation
Download Project
Next ProjectNext ProjectNext Project
Previous ProjectPrevious ProjectPrevious Project