EKG Patientensimulator Fehlermedung

OP #3431117
Lesenswert?

Hey Leute,

habe hier ein pogramm für einen EKG Patientensimulator, allerdings 
bekomme ich bei ATmel Studio 6 folgende fehlermeldung siehe anhang :)
nun weis ich nicht was ich machen sol da ich diese nicht verstehe.

hier das Programm. Ich weis es ist viel aber würde mir echt helfen

EkG Patienten-Simulator
1
#include<avr/io.h>
2
#include<util/delay.h>
3
#include<avr/interrupt.h>
4

5
#define set_FORWARD TCCR1A=0x81
6
#define F_CPU 1000000UL
7
#include<avr/pgmspace.h>
8

9
void InitADC()
10
{
11
ADMUX=(1<<REFS0);//|(1<<REFS1);          // FOR Aref=AVcc
12
ADCSRA=(1<<ADEN)|(1<<ADPS2)|(1<<ADPS1)|(1<<ADPS0);// Rrescalar div factor 128
13
}
14

15
uint16_tReadADC(uint8_tch)
16
{
17

18

19
                //Select ADC Channel ch must be 0-7
20
                //ch=ch&000000111
21
                //ADMUX|=ch
22
                
23
                //sart subgel conversion ADCSRA|(1<<ADIF)
24

25
                //wait for conversaion to complete
26
                //while(!(ADCSRA&(1<<ADIF)));
27

28
                // clear ADIF by writing one to it
29

30
ADCSRA|=(1<<ADIF);
31

32
return(ADC);
33
}
34

35
const uint8_t ecgwave[]PROGMEM=
36
{
37
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
38
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
39
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
40
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
41
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
42
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
43
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
44
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
45
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
46
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
47
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
48
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
49
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
50
0x30,0x31,0x33,0x35,ox36,0x37,0x38,0x39,0x39,0x3a,0x3b,0x3c,0x3c,0x3d,0x3d,0x3e,
51
0x3e,0x3f,0x3f,0x40,0x40,0x40,0x40,0x40,0x40,0x3f,0x3f,0x3f,0x3e,0x3d,0x3d,0x3c,
52
0x3b,0x3b,0x3a,0x39,0x38,0x37,0x36,0x35,0x33,0x31,0x30,0x30,0x30,0x30,0x30,0x30,
53
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
54
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
55
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
56
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
57
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x2d,0x2b,
58
0x29,0x27,0x26,0x24,0x22,0x20,0x1e,0x1b,0x1a,0x16,0x1e,0x2e,0x3c,0x50,0x5f,0x70,
59
0x82,0x91,0xa0,0xb4,0xc3,0xd6,0xf0,0xe6,0xd7,0xc3,0xb2,0x9a,0x8a,0x7b,0x67,0x55,
60
0x46,0x32,0x23,0x09,0x0f,0x16,0x1d,0x23,0x2c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
61
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
62
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
63
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
64
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
65
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
66
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
67
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
68
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
69
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
70
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
71
0x30,0x33,0x35,0x36,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3f,0x40,0x41,0x41,0x42,0x43,
72
0x44,0x44,0x45,0x46,0x47,0x47,0x48,0x49,0x4a,0x4a,0x4b,0x4c,0x4c,0x4d,0x4d,0x4d,
73
0x4e,0x4e,0x4f,0x4f,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
74
ox4f,0x4f,0x4f,0x4e,0x4e,0x4d,0x4d,0x4c,0x4c,0x4b,0x4b,0x4a,0x4a,0x49,0x48,0x48,
75
0x47,0x46,0x45,0x44,0x43,0x42,0x41,0x40,0x3f,0x3d,0x3c,0x3b,0x39,0x37,0x34,0x30,
76
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
77
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
78
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
79
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
80
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
81
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
82
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
83
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
84
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
85
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
86
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
87
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
88
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
89
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
90
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
91
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
92
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
93
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
94
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
95
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
96
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
97
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
98
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
99
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
100
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
101

102

103
};
104

105

106
const uint8_t bradywave[]Progmem= //256 values
107
{
108
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
109
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
110
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
111
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
112
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
113
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
114
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
115
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
116
0x30,0x31,0x33,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,
117
0x3e,0x3f,0x3f,0x40,0x40,0x40,0x40,0x40,0x40,0x3f,0x3f,0x3f,0x3e,0x3d,0x3d,0x3c,
118
0x3b,0x3b,0x3a,0x39,0x38,0x37,0x36,0x35,0x33,0x31,0x30,0x30,0x30,0x30,0x30,0x30,
119
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
120
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
121
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
122
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
123
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
124
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
125
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
126
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
127
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
128
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x2d,0x2b,
129
0x29,0x27,0x26,0x24,0x22,0x20,0x1e,0x1b,0x1a,0x16,0x1e,0x2e,0x3c,0x50,0x5f,0x70,
130
0x82,0x91,0xa0,0xb4,0xc3,0xd6,0xf0,0xe6,0xd7,0xc3,0xb2,0x9a,0x8a,0x7b,0x67,0x55,
131
0x46,0x32,0x23,0x09,0x0f,0x16,0x1d,0x23,0x2c,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
132
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
133
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
134
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
135
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
136
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
137
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
138
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
139
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
140
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
141
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
142
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
143
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
144
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
145
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
146
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
147
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
148
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
149
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
150
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
151
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
152
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
153
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
154
0x30,0x33,0x35,0x36,0x38,0x39,0x3a,0x3b,0x3c,0x3d,0x3f,0x40,0x41,0x41,0x42,0x43,
155
0x44,0x44,0x45,0x46,0x47,0x47,0x48,0x49,0x4a,0x4a,0x4b,0x4c,0x4c,0x4d,0x4d,0x4d,
156
0x4e,0x4e,0x4f,0x4f,0x4f,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,0x50,
157
0x4f,0x4f,0x4f,0x4e,0x4e,0x4d,0x4d,0x4c,0x4c,0x4b,0x4b,0x4a,0x4a,0x49,0x48,0x48,
158
0x47,0x46,0x45,0x44,0x43,0x42,0x41,0x40,0x3f,0x3d,0x3c,0x3b,0x39,0x37,0x34,0x30,
159
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
160
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
161
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
162
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
163
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
164
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
165
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
166
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
167
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
168
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
169
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
170
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
171
0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,
172
};
173

174
const unint8_t tachywave[]PROGMEM=//256 values
175
{
176

177
0x30,0x31,0x32,0x34,0x36,0x37,0x3a,0x3c,0x3f,0x42,0x44,0x45,0x67,0x49,0x4b,0x4c,
178
0x4e,0x4f,0x50,0x51,0x51,0x51,0x51,0x50,0x50,0x4f,0x4e,0x4e,0x4d,0x4c,0x4c.0x46,
179
0x42,0x3e,0x3c,0x3a,0x3a,0x3a,0x39,0x32,0x32,0x32,0x32,0x26,0x25,0x24,0x24,0x24,
180
0x24,0x24,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x1b,0x1b,0x1a,0x19,
181
0x18,0x18,0x17,0x15,0x14,0x13,0x0f,0x09,0x1e,0x32,0x46,0x5a,0x6e,0x82,0x96,0xaa,
182
0xbe,0xd2,0xe6,0xf0,0xf0,0xe1,0xd7,0xc8,0xb9,0xaa,0x9b,0x91,0x82,0x78,0x6e,0x5f,
183
0x50,0x41,0x30,0x2d,0x2b,0x2a,0x29,0x28,0x26,0x25,0x24,0x23,0x23,0x22,0x21,0x21,
184
0x20,0x1f,0x1e,0x1e,0x1e,0x1d,0x1d,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
185
0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,
186
0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1c,0x1d,
187
0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x2a,0x2b,0x2c,0x2d,
188
0x2e,0x2f,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x3a,0x3b,0x3d,0x3e,
189
0x3f,0x3f,0x40,0x41,0x41,0x42,0x42,0x42,0x42,0x42,0x41,0x41,0x41,0x41,0x40,0x40,
190
0x40,0x3f,0x3f,0x3f,0x3e,0x3e,0x3e,0x3d,0x3d,0x3d,0x3c,0x3c,0x3c,0x3c,0x3c,0x3c,
191
0x3c,0x3c,0x3b,0x3b,0x3b,0x3b,0x3b,0x3a,0x3a,0x3a,0x39,0x39,0x39,0x39,0x38,0x37,
192
0x37,0x37,0x36,0x35,0x35,0x34,0x33,0x32,0x32,0x31,0x31,0x30,0x30,0x30,0x30,0x30,
193
};
194
void delay_ms(usigned int ms){
195
  
196
  while(ms){
197
    _delay_ms(1.000);
198
    ms--;
199
    }
200
}
201

202
void delay_us(unsigned int us){
203
  
204
  while(us){
205
  _delay_us(1.000);
206
  us--;
207
  }
208

209

210
}
211

212
int main()
213
7i{
214

215
  int adc_cal;
216
      int var;
217
InitADC();
218
  DDRB=0x00;
219
  DDRD |=(1<<PD5)|(1<<PD4)
220
adc_val=ReadADC(0);
221
   volatile unsigned int i=0;
222

223
   TCCR1A|=(1<<COM1A1)|(1<<COM1B1)|(1<<WGM10)|(1<<WGM11);
224

225
   TCCR1B|=(1CS10)|(1<<WGM12);
226

227
   wgile(1){
228

229
     if(PINB & (1<<PB0)){
230

231
   i=0;
232

233
   //delay_ms(1000);
234

235
   OCR1A=0x00;
236
   set_FORWARD;
237
   //delay_ms(1000);
238

239
   while(i<1024)
240
   {
241
   OCR1A=pgm_read_byte(&bradywave[i]);
242
   i++;
243
       delay_ms(13);
244

245

246
}
247
  }
248

249
    if(PINB & (1<<PB1)){
250

251
    i=0;
252

253

254
    OCR1A=0x00;
255
    set_FORWARD;
256

257
    while(i<256)
258
    {
259
    OCR1A=pgm_read_byte(&tachywave[i]);
260
    i++;
261
        dealy_ms(14)
262

263
    }
264
      }
265

266
        if(PINB&(1<<PB")){
267

268
    InitADC();
269

270
    adc_val=ReadADC(0);
271
      adc_val=adc_val/16;
272

273
      if(adc_val==63){
274
       var=8;
275
         }
276

277
      if(adc_val<63 && adc_val>5){
278
       var=6;
279
         }
280

281
        if(adc_val<5 && adc_val>0){
282
       var=4;
283
         }
284
      i=0;
285

286

287

288
      OCR1A = 0x00;
289
      set_FORWARD;
290
      while(i<1024)
291
      {
292
      OCR1A=pgm_read_byte(&ecgwave[i]);
293
      i++;
294
            delay_ms(var);
295

296

297
      }
298
        }
299

300
        }
301

302

303
}
Angehängte Dateien:
#3431142
Lesenswert?

Wie kommt es, dass du da haufenweise Code hast, mit eigentlich 
läppischen Fehlern und läppischen Tippfehlern?

Tip: geh nicht davon aus, dass du in der Lage bist ein etwas größeres 
Programm in einem Rutsch fehlerfrei zu schreiben.
Sondern fang KLEIN an!
Arbeite in Schritten! Sieh zu, dass du dein Programm von 0 auf in 
kleinen SChritten entwickelst. Schritten, die du compilieren und testen 
kannst.

Dann wird das auch (vielleicht) was.
So wird das nichts. Denn du hast viel zu viel Code, den du nicht mehr 
überblickst und von dem du nichts weißt ausser: er ist fehlerhaft.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren