2
\$\begingroup\$

I am in the process of designing and prototyping up a circuit using the ATMega328P in a MLF package. It's the first time I've worked with the '328P on my own circuit, and the first time I've worked with MLF (though QFN is an every day experience for me, and I work daily with plenty of other microcontrollers...)

The ICSP portion of the circuit is pretty standard. I lifted it directly from the Arduino UNO schematic, but it's really just directly pins to header.

Trying to program it with a USB-ASP (cheap one from China) and it can't find the chip. I have confirmed the programmer works by connecting it to an Arduino, so that's fine. I have tried powering externally and powering from the USB-ASP. Nothing has any effect.

I have triple and quadruple checked the schematic and the PCB layout, and all seems perfectly fine to me - however I have probably gone PCB-Blind and am missing something absolutely obvious. I have checked continuity, probed for shorts, reflowed the chip, replaced the chip with one from a completely different batch, built a new circuit with just the AVR and decoupling capacitors - everything. I have even tried injecting a 1MHz clock signal into XTAL1... And all to no avail.

Reflowing is done using low-temperature paste at 250C.

AVRDude output with "force" enabled:

$ avrdude -p atmega328p -c usbasp -F

avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0xd037cf
avrdude: Expected signature for ATmega328P is 1E 95 0F

avrdude done.  Thank you.

The device signature is a random number. I get the same result with the programmer completely disconnected.

Schematic:

enter image description here

PCB layout:

enter image description here

MLF Soldering:

enter image description here

\$\endgroup\$
1
\$\begingroup\$

When I first saw the question I was about to suggest reflowing the chip.

Why don't you try to upload the bootloader program on the arduino and flash your chip with the arduino instead of using the chinese ASP?

Here's a tutorial https://www.youtube.com/watch?v=xl-XQ_te8zM

I hope this helps. I could suggest that if this does not work, replace the SOC. Maybe you burned the 328P

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Can't get anything out of ArduinoISP. Also tried a PICkit2, and that fails too. I have tried three chips on two boards, from two different batches from different suppliers. I can't have burned all three of them with just 250C reflow. I reflow PIC32s all day long at higher temperatures than that... \$\endgroup\$ – Majenko Jan 21 at 14:34
  • \$\begingroup\$ My logic analyzer connected in parallel with the USBASP shows reset, clock and MOSI pins working properly, but no responses back on MISO at all. \$\endgroup\$ – Majenko Jan 21 at 14:35
  • 2
    \$\begingroup\$ Hold up... a loose wire on the PICkit2... and that works...! \$\endgroup\$ – Majenko Jan 21 at 14:35
  • \$\begingroup\$ I know you're not strictly the answer, but you led me to suspect the programmer, and that's good enough for me. \$\endgroup\$ – Majenko Jan 21 at 14:47
  • \$\begingroup\$ @Majenko, mate, I have run in the exact same problem for the past 4 days: designing a chip of my own. When I answered your question so much time ago I did not imagine what you were going through. \$\endgroup\$ – bem22 Aug 19 at 18:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.