Go Down

Topic: arduino as isp bricks chips?? (Read 6 times) previous topic - next topic

westfw

The clock needs to be working for ISP programming to work.  It is relatively easy to set the clock in a way that causes it to STOP working.  The usual "brick my chip" mistake is to confuse "external crystal" and "external oscillator."
There's a substantial explanation on avrfreaks: http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325

shippo0708

grr... using arduino as ISP has been nothing but trouble for me -_- monday or tuesday ill get my actual ISP from spark fun so ill research more thanks to y'all and hopefully bootload all of my chips

westfw

Unless your real programmer has a zif socket, it may have similar issues.
(but at least any auto-reset uncertainties will be gone.)

dc42

#18
Sep 25, 2011, 09:16 am Last Edit: Sep 25, 2011, 09:27 am by dc42 Reason: 1

so you can program it to only run using a crystal of clock and nothing else works? I'm using a brand new breadboard with jump wires -_-


Yes. As shipped from the factory, the fuse bytes in an atmega328p are set to use the internal 8MHz clock scaled down to 1MHz. So it works (at 1MHz) and can be programmed without the crystal and caps connected. Programming the bootloader on it using the Arduino IDE also sets the fuse bytes to require a crystal, so that in future the mcu only works and can only be programmed when the crystal and 22pf capacitors are connected [EDIT - or when an external clock is connected, see Coding Badly's comment below].
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Coding Badly


Nearly any reasonable (e.g. 1 MHz) clock signal applied to XTAL1 allows the processor to be programmed regardless of the fuse settings.

shippo0708

#20
Sep 26, 2011, 03:36 am Last Edit: Sep 26, 2011, 03:37 am by shippo0708 Reason: 1

Unless your real programmer has a zif socket, it may have similar issues.
(but at least any auto-reset uncertainties will be gone.)



Well at bare minimum it will let me plug the chips i want to program into my duemilanove board for all the clock and power it needs so theres no need for breadboard nonsense... hopefully i won't have any problems with this bigger chip i need to program for my cnc

27 pf caps should work when hooking up a crystal for the clock right?

dc42


27 pf caps should work when hooking up a crystal for the clock right?


Yes, they should be OK. I've known someone get a board working with a crystal and no caps at all in the past, but this may not be reliable.
Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

shippo0708

ok i just got my Pocket AVR Programmer in the mail and it works for most of my chips... the two i just got in the mail tho don't work -_- when i plug them into my duemilnove board... and when i hook the programmer up in a breadboard sort of setup i can't get any chips to work ;(

Is there anything special to programming the chips via breadboard?

Coding Badly

Quote
Is there anything special to programming the chips via breadboard?


Not in my experience.  Power, processor clock (crystal), RESET, SCK, MISO, MOSI, GND correctly connected and it works.

shippo0708

yea turns out the 4 chips i just got in the mail... 2 atmega328p (this i know for sure) and 2 atmega1284p (40pin monsters :)) arrived DOA... the programmer will read every other chip i have, except these new ones... (tried mega8l, mega328, and mega328p and works)

gabbymoore

Thanks a lot for this!  Was starting to pull my hair out before I found your solution  :-)

spcomputing



Nearly any reasonable (e.g. 1 MHz) clock signal applied to XTAL1 allows the processor to be programmed regardless of the fuse settings.


Even a frequency pulser from another source, Arduino or AVR.  1 MHz with 0.5 pulsewidth width worked for me.

Go Up