 |
By: Anonymous: carjo24 () on Sunday, July 17 2011 @ 02:55 AM PDT (Read 11189 times)
|
|
|
Anonymous: carjo24 |
| Anonymous: carjo24 |
|
Hi,
I have the ISP shield V.1 and am trying to use it to program the arduino bootloader onto a blank atmega328p chip (TQFP-32 package). But everytime I use avrdude, I get the following error message:
stk500_getsync<>: not in sync: resp=0x00
I have auto reset disabled, but it still does not work. This is the first time I am using the shield through avrdude. It worked fine when uploading the bootloader onto an atmega168/328 (DIP28 package) through the arduino IDE, so I do not know what the problem could be.
I considered that I had the TQFP chip connected wrong, but I got the same result when setting up a DIP28 on a breadboard or even just placing it in the ZIF socket. Either way, avrdude gives me the same error. I am using Windows XP, the arduino is connected to COM1 (works well uploading sketches in arduino IDE). Any help would be much appreciated.
thanks,
carjo24
|
|
|
|
|
|
 |
By: Windell (offline) on Sunday, July 17 2011 @ 02:38 PM PDT
|
|
|
Windell |
| Windell |
|
If an operation is possible through the IDE, it should also be possible through avrdude.
First, I'd recommend trying to do the *exact* same thing (in terms of hardware) so that you eliminate possible hardware issues as complicating factors. If you're trying to program a chip in the ZIF socket, try it both with the IDE and avrdude without touching it, to make sure that nothing has physically changed between the two setups.
Next, what is the actual avrdude command line that you're using? The Arduino IDE uses avrdude "under the hood" to do its programming, so if it works there, it is likely that the problem is in your arguments to avrdude. See also our instructions for using the shield, here:
http://wiki.evilmadscience.com/Using_The_ISP_Shield
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: Anonymous: carjo24 () on Sunday, July 17 2011 @ 05:19 PM PDT
|
|
|
Anonymous: carjo24 |
| Anonymous: carjo24 |
|
Hi,
The command I am using in the command prompt is:
avrdude -c avrisp -p m328p
I am just trying to get avrdude to read in the programmer and the chip. Eventually I want to write the arduino bootloader onto the chip.
-carjo24
|
|
|
|
|
|
 |
By: Anonymous: carjo24 () on Sunday, July 17 2011 @ 05:37 PM PDT
|
|
|
Anonymous: carjo24 |
| Anonymous: carjo24 |
|
Hello again,
I am able to upload the bootloader onto an atmega328p through the arduino IDE no problem. This is while the chip is in the ZIF socket. The green programming LED stays on for about a minute, then the IDE says "Done Burning Bootloader. To verify it worked properly, I uploaded the "Blink" sketch.
But, when I try to use avrdude through the command prompt, I get the same 'not in sync' error message. The green programming LED lights up for a second then the error message appears.
I also forgot to mention that I installed the latest version of WinAvr, and placed it in c:\ directory. When I am accessing avrdude in the command prompt it is from this directory. From what I can tell, this version has the same files located in the hardware/tools folder of the arduino directory. Do you think this could be the problem?
-carjo24
|
|
|
|
|
|
 |
By: Windell (offline) on Sunday, July 17 2011 @ 06:12 PM PDT
|
|
|
Windell |
| Windell |
|
>avrdude -c avrisp -p m328p
This may not be complete. Try specifying the port, directly.
Something like:
avrdude -c avrisp -p m328p -P com1
I'm not sure how touchy this is-- you may need COM1 or com1, or possibly -P usb.
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: Anonymous: carjo24 () on Sunday, July 17 2011 @ 06:41 PM PDT
|
|
|
Anonymous: carjo24 |
| Anonymous: carjo24 |
|
Hi,
I tried adding com1, COM1 and usb to the command line, but still get the not in sync message. I tried this with the ZIF socket and while the chip was on a breadboard.
-carjo24
|
|
|
|
|
|
 |
By: Windell (offline) on Sunday, July 17 2011 @ 06:50 PM PDT
|
|
|
Windell |
| Windell |
|
> tried adding com1, COM1 and usb to the command line,
With the -P, I hope!
>I tried this with the ZIF socket and while the chip was on a breadboard.
Please stop changing what you're trying to do here. Pick ONE situation to debug, where you can verify that the hardware is constant.
Perhaps try adding a bit rate: avrdude c -avrisp -b 19200 -p m328p -P COM1
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: Anonymous: carjo24 () on Sunday, July 17 2011 @ 07:16 PM PDT
|
|
|
Anonymous: carjo24 |
| Anonymous: carjo24 |
|
yeah I added the com1 with the -P when I tried it. Still did not work. I also tried listing the programmer as '-p arduino' in the command line. I still get the not in sync error.
All I am trying to do is load the arduino bootloader onto an atmega328P-AU (TQFP32 package). So I have it on a breakout board, plugged into a breadboard. I added an external crystal and necessary caps and resistors.
I figured the best way to do this would be directly through avrdude, but I keep getting the not in sync error. I also tried uploading the bootloader through the arduino IDE. I selected the "Atmega328 on breadboard (8Mhz internal clock" option for the board. But when I try to upload the bootloader using "arduino as ISP" I get an error stating "invalid device signature"
I am assuming that the TQFP32 chip has a different signature than the PDIP28 chip. Do you happen to know the device signature for the Atmega328P-AU (TQFP32) chip?
-carjo24
|
|
|
|
|
|
 |
By: Windell (offline) on Monday, July 18 2011 @ 09:41 AM PDT
|
|
|
Windell |
| Windell |
|
"invalid device signature" is a different error, and (depending on the result that you get-- whether that's a zero or an actual device number) may indicate that you're communicating with the device.
The device signature does not change for an m328p in a different package.
It still sounds like you are trying to debug multiple problems at the same time-- both hardware and software.
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: dhembry (offline) on Monday, July 18 2011 @ 01:29 PM PDT
|
|
|
dhembry |
| dhembry |
|
Howdy!
carjo24:
 yeah I added the com1 with the -P when I tried it. Still did not work.
Okay, here's my two cents. I know you've done this before, but bear with my for a second, I just want to make sure we're on the same page:
- Set up your Arduino, upload ArduinoISP sketch.
- Attach ISP Shield and auto-reset resistor.
- Drop an ATMega328P into the ZIF socket on the ISP Shield.
- Select appropriate COM port, and Board options.
- Try to upload the Arduino bootloader using 'Arduino as ISP' option.
All works? Cool. Don't touch anything.
Open a command line window, and copy/paste the following line:
PHP Formatted Code avrdude -c avrisp -b 19200 -P COM1 -p m328p
Note the capitalizations. Also: change 'COM1' to match your COM port (i.e. 'COM2', 'COM3', 'COM4' ).
Let us know what what output you get - copy/paste the whole thing (command you ran and all the output from avrdude) into the reply if you can!
|

Apprentice
Status: offline
Registered: 07/05/11 Posts: 4
Sunnyvale, CA
|
|
|
|
|
 |
By: Anonymous: carjo24 () on Monday, July 18 2011 @ 05:33 PM PDT
|
|
|
Anonymous: carjo24 |
| Anonymous: carjo24 |
|
First off, thanks so much for all the help. I am actually trying to debug a software and hardware problem.
When putting an atmega328p into the ZIF socket, and after putting the command into the command prompt, I got the following message:
PHP Formatted Code
C:\>avrdude -p m328p -P com6 -c avrisp -b 19200
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.14s
avrdude: Device signature = 0x1e950f
avrdude: safemode: Fuses OK
avrdude done. Thank you.
C:\>
But, when I try to connect the ISP cable to an atmega328p (TQFP32) through a breadboard, I get the following message.
PHP Formatted Code
C:\>avrdude -p m328p -P com6 -c avrisp -b 19200
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.13s
avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.
avrdude done. Thank you.
So at this point I am sure its a hardware problem since the two different packages of the atmega328p chip should be the same. On the breadboard, I have the TQFP32 chip on a breakout board. There is a 16Mhz crystal on pins 7 and 8, with two 18pF caps going to ground from these same pins. All GND pins (3,5,21) are connected. All VCC pins (4,6,18,20) are connected. A 10K pull-up resistor is on the RESET pin (29). Then the necessary ISP pins are connected to the ISP programmer. Does this sound correct?
-carjo24
|
|
|
|
|
|
 |
By: dhembry (offline) on Monday, July 18 2011 @ 05:52 PM PDT
|
|
|
dhembry |
| dhembry |
|
 A 10K pull-up resistor is on the RESET pin (29).
Can you try to program the chip without this resistor in place? The ISP Shield has a pull-up resistor for the RESET line; shouldn't need do do anything special with this line on the target board.
|

Apprentice
Status: offline
Registered: 07/05/11 Posts: 4
Sunnyvale, CA
|
|
|
|
|
 |
By: Anonymous: carjo24 () on Monday, July 18 2011 @ 06:05 PM PDT
|
|
|
Anonymous: carjo24 |
| Anonymous: carjo24 |
|
I tried it without the 10K pull-up and still get the same error message.
-carjo24
|
|
|
|
|
|
 |
By: Windell (offline) on Monday, July 18 2011 @ 06:16 PM PDT
|
|
|
Windell |
| Windell |
|
 C:\>avrdude -p m328p -P com6 -c avrisp -b 19200
avrdude: AVR device initialized and ready to accept instructions Cool-- sounds like avrdude is working for you now!
For the TQFP32: What *exact* chip and model are you using? (ATMEGA328P-AU? ATMEGA328-AU? Something else?) And, what power supply voltage are you using?
If you're powering the TQFP32 from an independent power supply, what kind is it? And, are you *certain* that you've disconnected the "target power" option?
Are you using the 6-pin ISP connector, or the 10-pin ISP connector?
You might also want to try programming the DIP28 version on the breadboard to see if you're correct about which pin is which on the ISP connector.
Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/
|

Evil Scientist
 Status: offline
Registered: 06/15/06 Posts: 1932
Sunnyvale, CA
|
|
|
|
|
 |
By: dhembry (offline) on Monday, July 18 2011 @ 06:18 PM PDT
|
|
|
dhembry |
| dhembry |
|
 I tried it without the 10K pull-up and still get the same error message.
Weird. 
At this point I'd get out the multimeter and ensure the ISP header lines are going where I thought they were, and that the VCC/GND lines were powered and connected correctly to the target board.
Out of curiosity is the target board you're using something you built or is it a commercial product?
What crystal frequency are you using? Did you adjust the fuses on the chip at all?
Come to think of it, did the TQFP32 chip ever work at any point, either in this project or elsewhere?
|

Apprentice
Status: offline
Registered: 07/05/11 Posts: 4
Sunnyvale, CA
|
|
|
|
|