Pages: 1 [2]   Go Down
Author Topic: arduino as isp bricks chips??  (Read 6513 times)
0 Members and 1 Guest are viewing this topic.
SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6746
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 132
Posts: 6746
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6613
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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].
« Last Edit: September 25, 2011, 02:27:15 am by dc42 » Logged

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.

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12858
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
« Last Edit: September 25, 2011, 08:37:55 pm by shippo0708 » Logged

United Kingdom
Offline Offline
Tesla Member
***
Karma: 224
Posts: 6613
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 206
Posts: 12858
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Zürich, Switzerland
Offline Offline
Newbie
*
Karma: 0
Posts: 11
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

California
Offline Offline
God Member
*****
Karma: 14
Posts: 629
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


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.
Logged


Pages: 1 [2]   Go Up
Jump to: