Hello guys,
I have problem with my new ATmega168. I bought new chip with no arduino bootloader and, create circuit and followed steps as described here:
http://www.micahcarrick.com/tutorials/avr-microcontroller-tutorial/getting-started.html
(schema is too atached).
I tried too blink sketch compiled with arduino ide, and manually compiled and uploaded this:
#define F_CPU 1000000UL
#include <avr/io.h>
#include <util/delay.h>
int
main (void)
{
DDRB |= _BV(DDB0);
while(1)
{
PORTB ^= _BV(PB0);
_delay_ms(500);
}
}
Everything seems to by fine. Chip was programmed and verified correctly (i try to use avrdude and avrstudio).
Output here:
avrdude -p m168 -c avrispmkII -P usb -e -U flash:w:blik.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9406
avrdude: erasing chip
avrdude: reading input file "blik.hex"
avrdude: input file blik.hex auto detected as Intel Hex
avrdude: writing flash (198 bytes):
Writing | ################################################## | 100% 0.06s
avrdude: 198 bytes of flash written
avrdude: verifying flash memory against blik.hex:
avrdude: load data flash data from input file blik.hex:
avrdude: input file blik.hex auto detected as Intel Hex
avrdude: input file blik.hex contains 198 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 0.06s
avrdude: verifying ...
avrdude: 198 bytes of flash verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
But after reset no led blink on any pin. Where can be problem? I changed the fuse bits to this values (disable bootloader):
lfuse: 0x62, hfuse: 0xdf, efuse:0xfe.
Can anybody help me please? I check circuit 3x. Thanks a lot... Some files attached
blik.hex (578 Bytes)
Blinkx.cpp.hex (2.93 KB)
