1
\$\begingroup\$

I have been using a USBasp board and AVRDUDE to successfully program ATtiny13 chips. I thought I'd have a look at the chip from my Arduino (ATmega328P), but AVRDUDE can't seem to read the chip.

$ ./avrdude -p m328p -c usbasp
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
avrdude.exe: error: programm enable: target doesn't answer. 1
avrdude.exe: initialization failed, rc=-1
 Double check connections and try again, or use -F to override
 this check.
avrdude.exe done. Thank you.

I have checked the connections on the breadboard several times (I took the chip off the Uno and connected the pinout of the USBasp to the chip directly). Does the ATmega328P need an external oscillator to be programmed (there is one on the USBasp board)?

Peter Mortensen
1,6973 gold badges17 silver badges23 bronze badges
asked Aug 17, 2014 at 5:07
\$\endgroup\$
1

1 Answer 1

2
\$\begingroup\$

The ATmega on an Uno is clocked by an external crystal, in contrast to an off the shelf AVR which is configured for its internal RC resonator. This means that for reading the ATmega you either need to apply an external clock, say 1 ~ 20MHz, or use the ICSP header that is on the Uno board to communicate with the controller. This 6 pin ICSP header is actually meant for programming the AVR in circuit, hence 'In Cicruit Serial Programmer'.

answered Aug 17, 2014 at 6:56
\$\endgroup\$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.