Subversion Repositories MK3Mag

Rev

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

Rev 1 Rev 7
Line 1... Line 1...
1
/*****************************************************************************
1
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2
 
-
 
-
 
2
// + MK3Mag 3D-Compass
-
 
3
// + ATMEGA168 mit 8MHz
-
 
4
// + (c) 05.2008 Holger Buss
-
 
5
// + Nur für den privaten Gebrauch
-
 
6
// + Keine Garantie auf Fehlerfreiheit
-
 
7
// + Kommerzielle Nutzung nur mit meiner Zustimmung
-
 
8
// + Der Code ist für die Hardware MK3Mag entwickelt worden
-
 
9
// + www.mikrokopter.com
3
*****************************************************************************/
10
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4
#include "main.h"
11
#include "main.h"
5
volatile unsigned int CountMilliseconds = 0;
12
volatile unsigned int CountMilliseconds = 0;
6
volatile unsigned char Timer0Overflow;
13
volatile unsigned char Timer0Overflow;
7
unsigned int I2C_Timeout = 0;
14
unsigned int I2C_Timeout = 0;
8
unsigned int SIO_Timeout = 0;
15
unsigned int SIO_Timeout = 0;
Line 22... Line 29...
22
 
29
 
23
SIGNAL(SIG_OVERFLOW0)
30
SIGNAL(SIG_OVERFLOW0)
24
{
31
{
25
 static unsigned char cnt;
32
 static unsigned char cnt;
26
 static unsigned int cmps_cnt;
33
 static unsigned int cmps_cnt;
27
 TCNT0 -= 97;  // reload
34
 TCNT0 -= 101;  // reload
Line 28... Line 35...
28
 Timer0Overflow++;
35
 Timer0Overflow++;
29
 
36
 
30
 if(++cmps_cnt == 380)
37
 if(++cmps_cnt == 380)