Go Down

Topic: Duemilanove or Uno, for programming bootloader into blank chips, etc (Read 14729 times) previous topic - next topic

JoeO



Coding Badly


A resistor does not always work.  Try a 10 ?F capacitor between RESET and GND.

VE7BDF

I tried a 10uF and a 22uF capacitor and received the same error message.  I'm beginning to wonder if there is something else screwed up here.
I have checked both of the 328P chips using the USBtiny programmer and avrdude and even erased the chips before starting to try and load the bootloader program.
I could upload the results of the 328p test if that will help.

Martin

Coding Badly


With each test, did you re-upload the Arduino ISP sketch before trying to disable auto-reset?

Texy



With each test, did you re-upload the Arduino ISP sketch before trying to disable auto-reset?


..is your theory here that if it wasn't the 328p in the duemilanove board had its bootloader re-flashed instead of on the target 328p? And if it was, does the sketch also get erased because the complete flash area get erased before the bootloader is programmed?
Texy

Texy

Coding Badly


My theory is that, if the Duemilanove's bootloader gets control, it may have erased the Arduino ISP sketch.

VE7BDF

To be certain, I went through the whole process again this morning and loaded the Arduino ISO sketch each time I tried to defeat the reset function using a 120 ohm resistor for one test and the 10uF capacitor for the other.  I could also see that the Arduino ISP sketch was loading each time.  I quickly received the same error message for both tests.

Just to confirm, the test configuration I am using consists of the USB connection between the Duemilanove board with a confirmed Atmega 328P processor installed.  The Duemilanove board is connected to the blank 328P on the breadboard with the external 16MHz oscillator.  The connections are exactly as described in the "From Arduino to a Microcontroller on a Breadboard" article.  The only difference between my configuration and the one in the article is that the breadboard is powered from another 5V power supply.  Both 328P chips were erased using avrdude and the USBtiny programmer before I attempted to burn the bootloader program.  That probably wasn't required, but I was at a loss to figure out what was happening or not happening.

Since we know both processors are OK and the configuration appears to be correct, I find this very confusing.  I must be missing something, but I can't think of what it might be.  I have been researching this issue for several days and have found several different blogs on this particular problem with fairly complex solutions suggested. Some were suggesting a modification to the Make file ete., etc, but the dates of these blogs caused me to wonder if some of the bugs they were discussing might have been corre4cted in the latest Arduino software.  With this in mind, I felt that the simplest and most straightforward solution would be to download the latest Arduino software (0022) and follow the instructions provided in the article.

I greatly appreciate your help with this!

Martin

dc42


I did as you suggested and added a low value resistor on the reset pin of the 328P I was programming.  Unfortunately, I received the same error.


The resistor from reset to to +5v (or the capacitor to ground) goes on the Arduino board you are using as ISP, NOT on the target chip you are programming.
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.

VE7BDF

Excellent point.  I tried both the resistor and capacitor on the Duemilaove board as suggested, but on the breadboard left the 10K resistor between +5V and reset.  Again, I reloaded the Arduino ISP sketch to the 328p on the Duemilaove board prior to each test, then placed either the 120 ohm resistor between +5V and reset, or the 10uF capacitor between reset and ground.  I still received an error message, but not until around 10 seconds had passed.  Error Messages as below:

120 Ohm resistor, +5V to reset



10uF Capacitor, reset to ground



Are we getting closer?

Martin

CrossRoads

Just to be sure, your blank chip, you have that set up with a crystal/22 pf caps or similar?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

VE7BDF

Yes, that is correct a 16MHz crystal with two 22pf capacitors.  In fact I just checked the oscillator again with an oscilloscope.  It is working correctly.

VE7BDF

Since my last post I downloaded Arduino 0022 on an older desktop using XP professional to see if the problem might have originated in the Windows 7 O/S.  I am grasping at straws as you can see.  However, the result was the same as previously experienced.

My next thought was; what about the blank Atmega 328p processor?  I connected the USBtiny programmer to the 328P chip on the breadboard and with avrdude tried to find out if there was a problem with the processor.  The results were as follows:



I am curious about the comment "Yikes, Invalid device signature".  Does anyone have any insight into these results?

I would greatly appreciate comments.

Martin


Coding Badly


The all zero device signature indicates that the programmer (USBtiny) is not communicating with the target (328P).  The typical culprits are wiring and clocking.

CrossRoads

Course, in the 11 days that this been going on, you could have ordered & received an AVR ISP and have working parts already...
http://store.nkcelectronics.com/pocket-avr-programmer.html
or
http://www.mdfly.com/index.php?main_page=product_info&cPath=5&products_id=415

Ok, maybe 2 bad site suggestions (temporary tho, I have purchased these 2 items from both these places)

http://www.sparkfun.com/products/9825

https://www.adafruit.com/products/26 with a USB/RS2323 adapter cable/dongle?
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up