flashing m328p au(smd) with optiboot stk500v2 failure

I have searched as much as possible about this and have come to the convolution there is something wrong with my pcb design. To me it looks like a striped down version of the sparkfun pro mini 5v 16mHz dev board. I double checked all my traces and components and found everything looks good as far as i can tell.

I am using a olimex stx500v2 clone. and tested by flashing a virgin chip on a uno board successfully. I try to do the same with my 328p on my custom board and cannot connect.

unknown status 0x80
unknown status 0xc9
initialization failed
invalid device id 0x000000

So i thought i had a bad chip. reflowed a new one on and same thing. Thought it was a bad resonator (16mHz btw), reflowed that as well, and still got nothing.

pulled a sparkfun pro mini out, took off the processor and the resonator and reflowed my parts on and voila i was able to upload the boot loader.

I have continuity everywhere i am supposed to. double checked my reset is pulled high. have a constant 5.0v where there is suppose to be power. All grounds check good. I can't see where i screwed up. So i am hopeing someone here will be able to see it.

Here is the avrdude output

c:\Program Files (x86)\Arduino\hardware\arduino\bootloaders\optiboot>avrdude -c stk500 -P com18 -b57600 -p m328p -U lfuse:w:0xFF:m -U hfuse:w:0xDE:m -U efuse:w:0x05:m -v

avrdude: Version 5.10, compiled on Jan 19 2010 at 10:45:23
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\WinAVR-20100110\bin\avrdude.conf"

         Using Port                    : com18
         Using Programmer              : stk500
         Overriding Baud Rate          : 57600
         AVR Part                      : ATMEGA328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : STK500V2
         Description     : Atmel STK500
         Programmer Model: STK500
         Hardware Version: 2
         Firmware Version Master : 2.10
         Topcard         : Unknown
         Vtarget         : 5.0 V
         SCK period      : 27.2 us
         Varef           : 5.0 V
         Oscillator      : 60.433 kHz

avrdude: stk500v2_command(): unknown status 0x80
avrdude: stk500v2_command(): unknown status 0xc9
avrdude: stk500v2_program_enable(): cannot get connection status
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

Board Rendering
Dropbox - Error - Simplify your life

schematic
Dropbox - Error - Simplify your life

~ Quantity Needed Rating Description Manfacturor Part Number Case Size Supplier Link
C1-C4 4 0.1uF Multilayer Ceramic Capacitors - SMT TDK C1608X5R1E106M080AC 603 Mouser http://www.mouser.com/ProductDetail/TDK/C1608X5R1E106M080AC/?qs=sGAEpiMZZMs0AnBnWHyRQFzBYxg9rzNc%252bHHwwJIaPww%3D
C5,C6 2 10uF Tantalum Capacitors - Solid SMD AVX F951E106KAAAQ2 3216 Mouser http://www.mouser.com/ProductDetail/AVX/F951E106KAAAQ2/?qs=a5AWWN0nKwas3WDl91Tcvg%3D%3D
D3 1 Green LED Dialight 598-8070-107F 603 Mouser http://www.mouser.com/ProductDetail/Dialight/598-8070-107F/?qs=sGAEpiMZZMseGfSY3csMkcUUSK%2FIVnSg3L7qU8IdXJQ%3D
JP1 2 Screw Terminals TE 1776275-2 Mouser http://www.mouser.com/ProductDetail/TE-Connectivity-AMP/1776275-2/?qs=sGAEpiMZZMvZTcaMAxB2AAzkmOPH5l64U%2Fdo52MmR8c%3D
Q1 1 16MHz Resonators AVX PRQC16.00SR1010V00L Mouser http://www.mouser.com/ProductDetail/AVX/PRQC1600SR1010V00L/?qs=sGAEpiMZZMsBj6bBr9Q9aaWc9MiYpv8aeyFRFL%2Fq8lHKhiDHdQ0J1w%3D%3D
R1,R6 2 330 Resistors Vishay TNPW0805330RBEEA 805 Mouser http://www.mouser.com/ProductDetail/Vishay/TNPW0805330RBEEA/?qs=sGAEpiMZZMvdGkrng054t%252bPZDYtCzF2Jnc8fRlxARGw%3D
U1 1 Atmel ATMEGA328P-AU TQFP-32 Mouser http://www.mouser.com/ProductDetail/Atmel/ATMEGA328P-AU/?qs=sGAEpiMZZMu9ReDVvI6axzXTfdp%252beU5q9uBRrP4gYK0%3D
U2 1 5V LDO Regulator Exar SPX3819M5-L-5-0 SOT-23-5 Mouser http://www.mouser.com/Semiconductors/Power-Management-ICs/LDO-Voltage-Regulators/_/N-5cgac?P=1z0wa29Z1z0z33qZ1z0z7ptZ1z0wd8o
U3 1 Temperature Sensor Analog Devices TMP36GT9 TO-92 Mouser http://www.mouser.com/ProductDetail/Analog-Devices/TMP36GT9/?qs=sGAEpiMZZMucenltShoSnoiUfjKGVRv2bPXndGQRHgA%3D

Um. Optiboot implements STK500v1 only, and a tiny subset that has become incompatible with newer versions of avrdude at that. Try using "-c arduino" instead...

Edit: oops; I guess you're using a separate stk500 programmer (but don't they all run at 115200bps?) The avdrude output looks like you are failing to communicate with the programmer at all, which shouldn't be dependent on the board being correct. Do you get different behavior if you simply disconnect the programmer from the target board?

Your reset pull-up resistor is too low. It should be at least 10K ohms. It's probably not allowing your programmer to pull the reset line down low enough for programming.

Thanks for replying.

if i leave the programmer disconnected (just usb to programmer, no arduino) then it will tell me there is 0.00 target vcc. When it is connected to the arduino then it shows target vcc is 5.0.

Also i know the programmer works with that chip because i removed the 328p from the pro mini and put my hardware and can upload the boot loader. I am using the same chip (atmega328p-au), but just wanted to make sure the chip and resonator was functional.

There is a specific problem with my pcb and/ or the resistors and/or capacitors i have chosen. i just can not figure out what.

Hiduino you are absolutely correct. I don't know how i missed that....
I will fix that right now.

It was the 10k resistor.

Double checked all the traces and voltage values, didn't check component values.

Thank you! This was driving me nuts.

I don't remember by heart but I thought next to DTR is arduino's TX, then RX, not the other way around, at least for sparkfun FTDI adapters.

Yes, it looks like that's the way he has it. Looking at the PCB it's going to the right pins. Tx and Rx are crossed correctly.