I'm trying to use the arduino DUE board as a AVR Programmer. My target device is atmega328p. After uploading the ArduinoISP into the DUE Board. I've tried to let a pin toggle using the following code:
#define F_CPU 10000000
#include <avr/io.h>
#include <util/delay.h>
int main (){
DDRD |= (1<< PD7);
for(;;){
PORTD ^= (1<< PD7);
_delay_ms(1000);
}
return 0;
}
I want to use the internal oscillator and based this example I've adjust the makefile:
DEVICE = atmega328p
CLOCK = 8000000
PROGRAMMER = -c arduino -P COM10 -b 19200
OBJECTS = main.o
FUSES = -U lfuse:w:0x62:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m
the problem that I have is that when run :
make flash
I get the following :
and yes the port COM10 is definitely correct.
does anyone have a suggestion how to solve this ?
thanks in advance !