hallo leute...
ich bin noch relativ neu unterwegs mit µC und dadurch kann meine frage
womöglich peinlich erscheinen....
ich binn gerade dabei das ich mir eine garagentoorsteuerung baue und
will das ganze von einem µC steuern....
ich habe, nur um zu sehen ob das programmieren funktioniert folgendes
programm eingegeben:
1 | #include <avr/io.h>
|
2 |
|
3 |
|
4 | void main(void)
|
5 | {
|
6 | volatile uint16_t i;
|
7 | volatile uint16_t ii;
|
8 |
|
9 | //PORT C Output;
|
10 | DDRC = 0xFF;
|
11 |
|
12 | PORTC = 0xff; // Port C BitMuster 1111 1111
|
13 |
|
14 | while(1)
|
15 | {
|
16 |
|
17 | for(ii=0; ii<4; ii++)
|
18 | {
|
19 | for(i=0;i<40000;i++);
|
20 | }
|
21 |
|
22 | PORTC =~ PORTC; // Port C invertieren
|
23 | }
|
24 |
|
25 | }
|
und bekomm dabei folgenden fehler herraus:
1 | > "make.exe" program
|
2 | avrdude -p atmega16 -P avrdoper -c stk500v2 -U flash:w:code_basic.hex
|
3 |
|
4 | avrdude: stk500v2_command(): command failed
|
5 | avrdude: stk500v2_command(): command failed
|
6 | avrdude: stk500v2_program_enable(): cannot get connection status
|
7 | avrdude: initialization failed, rc=-1
|
8 | Double check connections and try again, or use -F to override
|
9 | this check.
|
10 |
|
11 |
|
12 | avrdude done. Thank you.
|
13 |
|
14 | make.exe: *** [program] Error 1
|
15 |
|
16 | > Process Exit Code: 2
|
17 | > Time Taken: 00:01
|
tja nun hab ich mir die frage gestellt wo wohl der fehler liegt, am µC
an meinem programm oder an was anderem...^^
würd mich freuen wenn ihr mir troz meiner unglaublichen unwissenheit
weiterhelfen könnt!!