0

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 :

enter image description here

and yes the port COM10 is definitely correct.

does anyone have a suggestion how to solve this ?

thanks in advance !

Engine
  • 101
  • 2
  • What are the fuses on the Atmega328P? And does it have a bootloader? You can [find out this stuff](http://www.gammon.com.au/forum/?id=11633) if you have a spare Uno or similar around. – Nick Gammon Jan 23 '17 at 05:50
  • 1
    I'm voting to close this question because questions about avrdude errors that are long abandoned without followup from the asker are effectively unanswerable. – Chris Stratton Aug 22 '17 at 14:57
  • As there's a chance a specific keyword combination will direct people here from Google, I think it's better if it's marked as duplicate, so there's a link on top of the page that contains possible steps to solve this problem. – Avamander Aug 22 '17 at 16:03

1 Answers1

0

There error you have is from avrdude failing to get a communication link established to the 'programmer' (which manipulates the target.)

Here is a link that may help with the connection

Stk500 error

Here is another relative link that may help

Arduino ISP on DUE

Best of luck.

Jack Wilborn
  • 116
  • 2