Hi Leute,
ich habe wieder mal ein Problemchen.
Ich habe folgenden Code in die Atmel Studio 7 IDE eingefügt.
1 | #define F_CPU 16000000UL
|
2 |
|
3 | #include <avr/io.h>
|
4 | #define F_CPU 16000000UL
|
5 | #include "avr/delay.h"
|
6 |
|
7 |
|
8 | #include "avr/interrupt.h"
|
9 |
|
10 | #include "main.h"
|
11 | #include "i2clcd.h"
|
12 | #include "i2cmaster.h"
|
13 |
|
14 | #define LED4 (1<<DDRB4)
|
15 | #define LED3 (1<<DDRB5)
|
16 | #define LED4on PORTB |= (1<<LED4)
|
17 | #define LED4off PORTB &= ~ (1<<LED4)
|
18 | #define LED3on PORTB |= (1<<LED4)
|
19 | #define LED3off PORTB &= ~ (1<<LED4)
|
20 | #define SW2 DDRD &= ~(1<<DDRD3)
|
21 |
|
22 |
|
23 |
|
24 | volatile int var;
|
25 | ISR (INT1_vect)
|
26 | {
|
27 | PORTB ^= (1<<LED4);
|
28 | var++;
|
29 | }
|
30 |
|
31 | int myfunc(void){
|
32 |
|
33 |
|
34 |
|
35 | DDRB = 0xFF;
|
36 | while(1)
|
37 | {
|
38 | LED4on;
|
39 | _delay_ms(200);
|
40 |
|
41 | LED4off;
|
42 | _delay_ms(800);
|
43 | }
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | DDRB = 0xFF;
|
50 | while(1)
|
51 | {
|
52 |
|
53 | LED4on;
|
54 | LED3off;
|
55 | _delay_ms(100);
|
56 |
|
57 | LED4off;
|
58 | LED3on;
|
59 | _delay_ms(400);
|
60 | }
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | char oldStatusPinD = 1;
|
66 | char newStatusPinD = 1;
|
67 | DDRD &= ~(1<<PIND3);
|
68 | DDRB |= (1<<PORTB3);
|
69 |
|
70 | while (1){
|
71 | newStatusPinD = (PIND & (1 << PIND3));
|
72 | if((!newStatusPinD) && (oldStatusPinD)){
|
73 |
|
74 | PORTB ^=(1<<PORTB4);
|
75 | } oldStatusPinD = newStatusPinD; }
|
76 |
|
77 |
|
78 |
|
79 | DDRB |= (1<<DDRB4);
|
80 | DDRD &= ~(1<<DDRD3);
|
81 | sei();
|
82 | EIMSK |= (1<<INT1);
|
83 | EICRA |= (1<<ISC01);
|
84 | while(1){
|
85 |
|
86 | }
|
87 |
|
88 |
|
89 | sei();
|
90 | EIMSK |= (1<<INT1);
|
91 | EICRA |= (1<<ISC01);
|
92 | var = 0;
|
93 | i2c_init();
|
94 | lcd_init();
|
95 | lcd_light(true);
|
96 |
|
97 | char zeile[17] = {};
|
98 | while(1)
|
99 | {
|
100 | sprintf(zeile, "%i" ,var);
|
101 | lcd_printlc(1, 1, zeile);
|
102 | }*/
|
wenn ich das Programm dann kompiliere, kriege ich folgende
Fehlmeldungen.
recipe for target 'main.o' failed
main.h: NO such file or directory
Könnt ihr mir bitte erklären wo mein Fehler ist?