Hi there, I'm trying to upload the program to an Arduino board which is used Atmega328p by Atmel Studio 6. First, I coded on Arduino IDE then upload. The result is good XD, but when I use the button "upload the program to an Arduino board". Although I saw the light of RXD and TXD were blink
, I didn't see anything after that
.
My code is make a led blink. ![]()
#include <mega328p.h>
#include <delay.h>
void main(void)
{
DDRD = 0xFF; // set PORT B, C, D output
DDRB = 0xFF;
DDRC = 0xFF;
while (1)
{
PORTD = 0xFF; // turn on PORT B, C, D
PORTB = 0xFF;
PORTC = 0xFF;
for(i=0; i<1000; i++) //wait a sec...
{
}
PORTD = 0x00; // turn off PORT B, C, D
PORTB = 0x00;
PORTC = 0x00;
}
}