Hi, new to the bare metal scene. i am using the atmel studio 7 with a usbasp programmer and i am having the same problem. here is my code.
#include <avr/io.h>
#include <util/delay.h>
int main(void)
{
/*Set to one the fifth bit of DDRB to one
**Set digital pin 13 to output mode */
DDRD = 0xFF;
/* Replace with your application code */
while (1)
{
PORTD = 0xFF;
_delay_ms(50);
PORTD = 0x00;
_delay_ms(50);
}
}
the output console gives this message but the port D LED does not flash.
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.00s
avrdude.exe: Device signature = 0x1e9502 (probably m32)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: reading input file "Debug\GccApplication1.hex"
avrdude.exe: input file Debug\GccApplication1.hex auto detected as Intel Hex
avrdude.exe: writing flash (162 bytes):
Writing | ################################################## | 100% 0.27s
avrdude.exe: 162 bytes of flash written
avrdude.exe: verifying flash memory against Debug\GccApplication1.hex:
avrdude.exe: load data flash data from input file Debug\GccApplication1.hex:
avrdude.exe: input file Debug\GccApplication1.hex auto detected as Intel Hex
avrdude.exe: input file Debug\GccApplication1.hex contains 162 bytes
avrdude.exe: reading on-chip flash data:
Reading | ################################################## | 100% 0.13s
avrdude.exe: verifying ...
avrdude.exe: 162 bytes of flash verified
avrdude.exe: safemode: Fuses OK (E:FF, H:99, L:E1)
avrdude.exe done. Thank you.
Please help. thank you so much.