Ich verstehs nicht... Ich versuche eine globale Variable in der ISR anzusprechen. Der CodeVision-Compiler meldet mir immer nur: "undefined symbol 'tick'" Was mache ich falsch?? Hier der Code:
1 | #include <mega128.h> |
2 | |
3 | // Timer 1 overflow interrupt service routine
|
4 | interrupt [TIM1_OVF] void timer1_ovf_isr(void) |
5 | {
|
6 | // Place your code here
|
7 | tick++; |
8 | }
|
9 | |
10 | // Declare your global variables here
|
11 | volatile unsigned char tick; |
12 | |
13 | void main(void) |
14 | {
|
15 | |
16 | //[....] Initialisierung der Hardware
|
17 | |
18 | while (1) |
19 | {
|
20 | // Place your code here
|
21 | #asm("nop");
|
22 | #asm("nop");
|
23 | };
|
24 | }
|