ISP bootload QFP32 ATmega328P-AU: succeeded bootloading, failed uploading sketch

Hi,

I followed the http://arduino.cc/en/Tutorial/ArduinoToBreadboard tutorial and got the ATmega32P-PU bootloaded (using QFP32-to-DIP32 adapter). However, there is an error when uploading a sketch.

Error:
" avrdude: stk500_recv(): programmer is not responding "

Here are two configurations:
One for burning the bootloader http://www.flickr.com/photos/94204676@N08/8567092770/in/photostream/lightbox/
Another for uploading a sketch http://www.flickr.com/photos/94204676@N08/8567180350/in/photostream/lightbox/

Any suggestions are greatly appreciated.

Thanks.

do you still have a avr in your arduino? cause if so they would be clashing when avrdude says hello

also take out that 1uf cap and just wire resets together (ya I know its there for a reason, but its a debug point)

Hi Osgeld, how to check if it has the avr on?

just remove the atmega328p from the arduino then try uploading to your bread board

Hi

The first thing I see here is it appears you're using a hybrid of several ideas to get things working.

If using an Arduino Uno the 0.1uF capacitor to your programmer's reset is in an odd location. It shouldn't be connected to the reset on the target processor. Reverse its polarity so the stripe is away from the reset, and put the other side directly to GND. That is to stop the programmer from responding to the reset during programming (you want the target processor to reset, not the programmer in that situation). However if you follow the tutorial you link to, they are linking the reset pins together without a capacitor, and removing the ATMega from the Arduino - this is so the Arduino effectively becomes a USB converter which passes the signals through from the PC and there's no processor on board to respond to the reset so that signal goes direct to your target. So either method will work, but I expect not both :slight_smile:

Next the pull-up resistor value from the target to +5V I should think is a little low. In contrast to your 46R, normally I'd use something like a 10k there. Here's what Atmel publishes in their Hardware Design Considerations application note on ATMega328:

This pull-up resistor makes sure that reset does not go low unintended. The pull-up resistor can in theory be of any size, but if the Atmel®AVR® should be
programmed from e.g. STK500/AVRISP the pull-up should not be so strong that the programmer cannot activate RESET by draw the RESET line low. The recommended
pull-up resistor is 4.7k? or larger when using STK500 for programming. For debugWIRE to function properly, the pull-up must not be smaller than 10k?.

If you're comfortable with pulling the uC from your Arduino I'd go back to the original tutorial and follow those instructions closely. If you want to use the bootloader method another way would be to use a FTDI breakout board as explained in this excellent writeup by Nick Gammon.

Hope this helps,
Geoff

Oh yes the picture was wrong. I did take out the IC from the Arduino board when uploading a sketch.

also take out that 1uf cap and just wire resets together (ya I know its there for a reason, but its a debug point)

I've tried taking out the cap. The same error still showing up.

cross your RX and TX lines, leave the cap out of it

cross your RX and TX lines, leave the cap out of it

I've tried this and still had no luck.

Did you fix the resistor value?

Hi strykeroz,

Thanks for the information.

I didn't have any luck using UNO so follow the instruction line by line and using Duemilanove w/ an ATmega328.

However if you follow the tutorial you link to, they are linking the reset pins together without a capacitor, and removing the ATMega from the Arduino - this is so the Arduino effectively becomes a USB converter which passes the signals through from the PC and there's no processor on board to respond to the reset so that signal goes direct to your target. So either method will work, but I expect not both

Next the pull-up resistor value from the target to +5V I should think is a little low. In contrast to your 46R, normally I'd use something like a 10k there.

This works well both on burning the bootloader and uploading a sketch on DIP28 package, but not when the target chip is QFP32.
The reason I kept the cap and 46R on the setup was because it enabled the bootloading on the QFP32 package.

Nick Gammon's document looks great. I'll give it a go.

Thanks.

Yes I did change the resistor back to 10K Ohms but still can't upload a sketch.