Hello,
I'm trying to program the ATmega2560 on my Arduino Mega 2560 via the ICSP header next to it.
My programmer is an USBASP device.
I am uploading the following blink code:
#define F_CPU 16000000UL
#include <util/delay.h>
int main() {
DDRB = 0xFF;
while(1)
{
//PORTB ^= _BV(7); //for atmega
PORTB ^= _BV(3); //for attiny
_delay_ms(500);
}
}
When uploading the code for an ATINY85 I select the board from damellis/attiny.
My question is: What board do I select for the ATMEGA2560?
I can upload the bootloader using the "Arduino Mega or Arduino Mega 2560" board, but the code does not upload.
Any advice?