Showing posts with label DCF77 LED Clock C Source Code. Show all posts
Showing posts with label DCF77 LED Clock C Source Code. Show all posts

DCF77 LED Clock C Source Code | Microcontroller Project

1 comments


/*
* DCF-77 LED CLOCK
*
* PIC16F84A
* 10 Mhz crystal, HS clock
*
* PORTA.0->3, out : 7 segment cathod control
* PORTA.4, in ; DCF pulse input
*
* PORTB.0->7, out : 7 segment output
* PORTB.7, in : button input
*
* Author : Bruno Gavand, november 2005
* see more details on www.micro-examples.com
*
*/

/*
* constant definitions
*/
#define MAXCOUNT 9766 // number of TMR0 overflows in 1 second
#define ADJUST 96 // extra ticks in 1 second

/*
* this values are reduced in practice
* to give some flexibility to DCF-77 pulse reception
*/
#define timer_d_min 14000 // number of TMR0 overflows in 2 seconds : 19531
#define timer_h_0 640 // number of TMR0 overflows in 0.1 second : 976
#define timer_h_1 1400 // number of TMR0 overflows in 0.2 second : 1953 more..........

 

Free Download Engineering Books - IEEE Books | Copyright 2009-2013 All right reserved | Design by BMW Automobiles | Created by Umair Sheikh