Hello
I've done a project on arduino mega 2560 and want to move it to a pcb that i've designed and had manufactured. I've soldered everything together and uploaded the blink sketch using usbasp (i have a led on digital pin 4). It run very slowly. After searching with google, i've learned that i need to set the fuse bites to use the externel crystal (it's a brand new atmega 2560). So i've burned the bootloader (it's supposed to set those bytes). Now the blink sketch will upload but won't do anything, but when i upload:
#ifndef F_CPU
#define F_CPU 16000000UL
#endif#include <avr/io.h>
#include <util/delay.h>int main(void)
{
DDRG = (1<<PG5);while(1)
{
//LED On
PORTG = (1<<PG5);
_delay_ms(1000);//LED Off
PORTG = (0<<PG5);
_delay_ms(1000);
}
}
it runs ok. Can anyone help me? How to solve this problem?