0
\$\begingroup\$

Ok guys, I wanted to make simple electronic device (mostly RGB display) so I bought all the stuff.

I have read like dozens of diffrent tutorials and I managed to connect ATmega328p to breadboard, I burned bootloader to it with my USBasp (internal 8Mhz clock). Everything seemed fine so I upload a Blink sketch from Arduino IDE. It worked great, the LED was powered from Pin13 (same as SCK from USBasp) and it was blinking. So I wanted to try Fading Sketch. But The Led kept blinking.

I was trying to upload ther sketches, empty sketches, burning bootloader, more sketches, more burning, diffrent bootloaders (even external 8Mhz clock), and still... Always the same error (sck period while bootloader and not in sync from avrdude) - even though each time the IDE says all went fine.

I checked connections twice, can you help me out with this? I am desperate at this point. My old (first) program with blinking LED is on ATmega and I cannot upload anything else.

  • can someone give me valid boards.txt file to properly configure and burn bootloader?

Thanks in advance!!

\$\endgroup\$
  • 1
    \$\begingroup\$ Why do you need a bootloader if you're using ISP? But now you need to strap a crystal to the chip. \$\endgroup\$ – Ignacio Vazquez-Abrams Sep 20 '16 at 11:23
  • \$\begingroup\$ Well, don't I? Can I directly upload sketches through USBasp without bootloader? I thought it's a must-have, I dunno. I adde a crystal to chip, no positive results. \$\endgroup\$ – Adrian Dąbek Sep 20 '16 at 11:29
  • \$\begingroup\$ Did you set any fuse bit for external clock? \$\endgroup\$ – winny Sep 20 '16 at 11:37
  • \$\begingroup\$ @winny: Most certainly, if the bootloader was uploaded via the IDE. \$\endgroup\$ – Ignacio Vazquez-Abrams Sep 20 '16 at 11:38
  • \$\begingroup\$ @IgnacioVazquez-Abrams That's usually how I loose communication and have to dig up a crystal somewhere. \$\endgroup\$ – winny Sep 20 '16 at 11:39
1
\$\begingroup\$

Ok, it seems I solved it out. I feel really dumb but I gotta say what I did for other dummies with the same issue :)

I added the quartz and burnt another bootloader (eventually it was duemilanove 328) and then I just did File > Upload using programmator (im not sure of the english translation) and it worked... I didn't even know there is diffrence between upload button and this.

\$\endgroup\$
  • \$\begingroup\$ Upload = upload sketch to pre-existing bootloader using UART(FTDI, PL2303, CH340, etc). Upload using programmer = burn bootloader + sketch using ISP (USBAsp, Arduino as ISP, Atmel ICE, etc) \$\endgroup\$ – Wesley Lee Sep 20 '16 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.