Electronic Circuits Schematics Projects




PIC clock

Rating: 7.00/10 (66Votes cast)

Category: Microcontroller Circuits / PIC Microcontroller
Views: 5013
Rank: 4

The WWVB signal is broadcast as a 60 kHz carrier that is AM modulated with a time code frame that is updated once per minute. The data rate is one bit per second. Along with time code information, the data frame also contains synchronization bits, calendar data, UT1 correction, leap year, and leap second data. The clock design presented here only decodes the time data and daylight savings correction data. The software could easily be modified to include decoding of the other information bits, if desired. The the low frequency WWVB signal strength is weak and reception can be problematic. Signal acquisition time is variable, depending on location and atmospheric conditions. Reception is usually best at night between 8pm - 4am. To use the clock, just apply power and wait for reception of the WWVB signal. When the clock receives a complete error-free frame of data, it will automatically reset the display to show the correct time. After the initial time correction, the clock will maintain time even if WWVB reception is lost.As shown in the schematic (pdf format), the heart of the clock is a PIC 16F628 microcontroller running at 4 MHz. Decoded time data is sequentially output from the microcontroller (RA0 - RA3) to the 7-segment decoder/drivers on a 4-bit data bus. The data is output sequentially as seconds, 10s of seconds, minutes, 10s of minutes, hours, and 10s of hours. The microcontroller outputs (RB1, RB2, RB3) route a 10 uSec stroble pulse from RB4 out to each of the 7-segment decoder/drivers at the proper time to latch the data bus values. Seconds and 10s of seconds display values are updated once per second. Minutes, 10s of minutes, hours, and 10s of hours are updated once per minute. The display consists of 1" red-orange LED 7-segment displays. The decimal points on the displays are used to form colons to separate the seconds, minutes, and hours. The 10s of seconds and 10s of minutes displays are mounted upside down to form the upper colon dots. The WWVB receiver is a C-MAX model CMMR-6 and is available from Digi-Key (www.digikey.com) as part # 561-1014-ND complete with loopstick antenna. Data output from the receiver is sampled by the microcontroller on RB0. Construction I have built two of these clocks, one using point-to-point wiring and one using a pcb. Both versions perform well. Just keep the receiver away from noise sources and the wire / trace lengths short to minimize inductance. I found that the receiver is also sensitive to magnetic fields produced by power supplies. I used a 9V, 200 mA "wall-wart" instead of an internal power supply to eliminate this problem. My pcb was designed using Free PCB software www.freepcb.com. The artwork contains both the main board and the display board on a single layout to save the cost of two separate boards. I purchased the pcb from www.4pcb.com by sending them the gerber files and using their "bare-bones" process. The "bare-bones" process does not include solder mask nor silk-screen. Just cut off the display board from the main board and mount it at a right angle to the main board and wire them together using the pads provided. Receives time broadcast from WWVB, Fort Collins, CO Auto synchronizes internal time with WWVB time Maintains local time when WWVB signal is lost This version is for Pacific Standard Time, and auto detects/corrects for Daylignt Savings Time 6-digit display of hours, minutes, seconds using 1" seven-segment LED displays WWVB sync indicator Time display is in 12-hour format PIC 16F628 microcontroller Software written in C All tools (schematic editor, C compiler, PCB layout software, PIC programmer are free and available for download on the web. visit page.
PIC clock



As shown in the schematic (pdf format), the heart of the clock is a PIC 16F628 microcontroller running at 4 MHz. Decoded time data is sequentially output from the microcontroller (RA0 - RA3) to the 7-segment decoder/drivers on a 4-bit data bus. The data is output sequentially as seconds, 10s of seconds, minutes, 10s of minutes, hours, and 10s of hours. The microcontroller outputs (RB1, RB2, RB3) route a 10 uSec stroble pulse from RB4 out to each of the 7-segment decoder/drivers at the proper time to latch the data bus values. Seconds and 10s of seconds display values are updated once per second. Minutes, 10s of minutes, hours, and 10s of hours are updated once per minute. The display consists of 1` red-orange LED 7-segment displays. The decimal points on the displays are used to form colons to separate the seconds, minutes, and hours. The 10s of seconds and 10s of minutes displays are mounted upside down to form the upper colon dots. The WWVB receiver is a C-MAX model CMMR-6 and is available from Digi-Key (www.digikey.com) as part # 561-1014-ND complete with loopstick antenna. Data output from the receiver is sampled by the microcontroller on RB0. Construction I have built two of these clocks, one using point-to-point wiring and one using a pcb. Both versions perform well. Just keep the receiver away from noise sources and the wire / trace lengths short to minimize inductance. I found that the receiver is also sensitive to magnetic fields produced by power supplies. I used a 9V, 200 mA `wall-wart` instead of an internal power supply to eliminate this problem. My pcb was designed using Free PCB software www.freepcb.com. The artwork contains both the main board and the display board on a single layout to save the cost of two separate boards. I purchased the pcb from www.4pcb.com by sending them the gerber files and using their `bare-bones` process. The `bare-bones` process does not include solder mask nor silk-screen. Just cut off the display board from the main board and mount it at a right angle to the main board and wire them together using the pads provided. Receives time broadcast from WWVB, Fort Collins, CO Auto synchronizes internal time with WWVB time Maintains local time when WWVB signal is lost This version is for Pacific Standard Time, and auto detects/corrects for Daylignt Savings Time 6-digit display of hours, minutes, seconds using 1` seven-segment LED displays WWVB sync indicator Time display is in 12-hour format PIC 16F628 microcontroller Software written in C All tools (schematic editor, C compiler, PCB layout software, PIC programmer are free and available for download on the web. http://www.electronics-lab.com/projects/mcu/013/index.html

Related circuits

Gear clock using PIC 16f628A

The heart of the clock is a PIC 16f628A microcontroller (PDF). This microcontroller has an internal oscillator however an external 20MHz crystal oscillator is being used since it will have to accurately keep track of time for weeks and months. The microcontroller is interfaced to two buttons and...



LED Chaser with PIC16F84A / 16F628A

This simple circuit functions as a 12 LED chaser. A single illuminated LED 'walks' left and right in a repeating sequence, similar to the effect seen on KITT, the car in the Knight Rider TV series. Fully commented source code and programmer ready HEX files are provided for the PIC 16F84A and...



Low Cost Dialing Alarm

This is the lowest cost dialing alarm on the market and shows what can be done with an 8-pin microcontroller. The circuit requires a trigger pulse to turn on a BC 557 transistor. This delivers power to the microcontroller. The micro starts to execute the program and outputs a high on GP2 to keep...



serial LCD interface for PIC

If you are developing applications for the PIC mcu, and miss debugging tools, or don't have enough I/O pins for a parallel LCD interface in your design, this serial interface can help printing debug messages and/or reduce the pin count. This version uses a Hitachi HD44780 compatible LCD module in...



Electronic Die with PIC16F84

Built using a PIC16F84, about 4 hours worth of code and a few bits on a breadboard. This was the first time I've worked with PIC's so it was a learning exercise. I started with the 'Hello World' microcontroller equivalent i.e. Blinking LED, then tried the 'Knight Rider' sequencing LEDs, and then...



darkroom timer with PIC 16F84A

I tried to design a timer that would do everything it needed to do but with the smallest number of pieces and simplest mode of operation. It only needs the PIC, a four digit LED display, one other IC, a resistor network, one pushbutton switch and a capacitor. It can run on batteries if you use a...



PIC12C508A Beacon

Robot Beacon is a rotating light. We have called it Robot Beacon as it has been designed as an addition for a robot, but it can be used for many applications. It can be used as a mast-head beacon on a boat or as an "all-round" warning light on a bike. Robot Beacon uses a PIC12C508A OTP (One...



Saving the OSCCAL value for PIC 12F629 / 12F675

The PIC 12F629 and 12F675 have a factory set oscillator calibration value written to the last program memory location during manufacture. When programming the PIC the programmer software should read this value out, merge it with the program data being written to the PIC, and then write it back.



Digital Circuit Simulation of 24 hrs Clock

TISHITU Basic Electronics BCD to 7-segment latch-decoder-driver in Proteus Si...


Comments




 characters left

Captcha

captchaPlease input letters you see on the image.
Click on image to redraw.



Facebook Comments

Most searched
 
Accounts area
Username:
Password:
Forgot password? Register
Circuits