Subversion Repositories group.electronics

Rev

Rev 86 | Rev 88 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 86 Rev 87
Line 1... Line -...
1
/* Name: main.c
-
 
2
 * Project: EasyLogger
-
 
3
 * Author: Christian Starkjohann
-
 
4
 * Creation Date: 2006-04-23
-
 
5
 * Tabsize: 4
-
 
6
 * Copyright: (c) 2006 by OBJECTIVE DEVELOPMENT Software GmbH
-
 
7
 * License: Proprietary, free under certain conditions. See Documentation.
-
 
8
 * This Revision: $Id$
-
 
9
 */
-
 
10
 
-
 
11
#include <avr/io.h>
1
#include <avr/io.h>
12
#include <avr/wdt.h>
2
#include <avr/wdt.h>
13
#include <avr/interrupt.h>
3
#include <avr/interrupt.h>
14
#include <avr/pgmspace.h>
4
#include <avr/pgmspace.h>
15
#include <util/delay.h>
5
#include <util/delay.h>
Line 279... Line 269...
279
 
269
 
280
 
270
 
281
ISR(TIMER0_OVF_vect) {
271
ISR(TIMER0_OVF_vect) {
282
        tmr0_ovf++;
272
        tmr0_ovf++;
283
 
273
 
-
 
274
	// Clk/1 TCCR0B = (1<< CS00);
-
 
275
	//20.0Mhz, 1ms = 78ovf
284
	//16.5Mhz, 1ms = 50ovf
276
	//16.5Mhz, 1ms = 64ovf
285
	//12.0Mhz, 1ms = 46ovf
277
	//12.0Mhz, 1ms = 46ovf
286
 
278
 
287
        if (tmr0_ovf>=65) {
279
        if (tmr0_ovf>=78) {
288
                systime++;
280
                systime++;
289
                tmr0_ovf = 0;
281
                tmr0_ovf = 0;
290
 
282
 
291
		if (debounce.timer != 0)
283
		if (debounce.timer != 0)
292
			debounce.timer--;
284
			debounce.timer--;