0
\$\begingroup\$

EDIT: To summarise - when I take the microcontroller off the board, it works. But when I leave it on the board and try to program it, I cannot.

I have designed a PCB and had it fabricated. This PCB has ICSP programming pins specifically for the purpose of allowing it to be reprogrammed in-situ.

My problem is that the chip (ATtiny44A) will not accept new programming - indeed, the programmer hardware doesn't even detect its presence! - unless I remove it from the board and place it into a ZIF socket.

When I try to program the chip on the board (using a clone USBasp and avrdude), it says "target didn't answer" and such - in other words, no chip found. Very occasionally it works (like, one time in fifty), but reports verification errors and the like.

I have tested that the ICSP pins are connected to the correct pins of the chip using a multimeter; and also checked for shorts between the pins.

I have partially assembled the board. I realise that ICSP can often be negatively affected by the presence of other connected circuitry; but I have not yet placed any components that should cause a problem.

Here is the schematic. I have greyed out parts that are not yet present on the board. As you can see, nothing has been connected to the microcontroller by more than one wire, and therefore does not exist:

schematic

Here are some pictures of the board. The enamelled wire is present because I damaged a trace on the board whilst soldering. Two of the resistors underneath the chip are only connected at one end, in an attempt to diagnose the problem.

top of board

bottom of board

I've tried everything I can think of. What could be causing this strange behaviour?

\$\endgroup\$
  • 2
    \$\begingroup\$ I didn't find a pull-up on the Tiny44 Reset line. While that pin can be used for other purposes, if you want to use ISP it will need a pull-up resistor on it. \$\endgroup\$ – Wendall May 23 at 18:20
  • 2
    \$\begingroup\$ Decoupling Caps? \$\endgroup\$ – Tyler May 23 at 18:22
  • 2
    \$\begingroup\$ No-one has downvoted your question. It currently has no votes either way. The 1 close vote it has is "too broad" - not sure why though. \$\endgroup\$ – brhans May 23 at 19:24
  • 2
    \$\begingroup\$ Having a rant about votes is a surefire way to attract downvotes though ... \$\endgroup\$ – brhans May 23 at 19:26
  • 2
    \$\begingroup\$ I think you have pretty much verified that there is a difference between your "programmer" and your layout. If you can use an oscilloscope and program one in your programmer, watch the ICSP lines especially the rising and falling edges of them and also the Reset line. Then do the same while trying the one on your board. You will find the difference, and find the problem. \$\endgroup\$ – Wendall May 23 at 20:39
1
\$\begingroup\$

For debugging, I would put the uC on a breadboard, and one-by-one connect its pins to the target board and see which connection blocks the programming.

As I see no connection on your board to the logic pins involved in programming, my guess would be the power pin, because either:

  • the the board loads the power beyond what the programmer can supply
  • the programmer power-cycles the uC which is prevent by the board

In both cases a suitable resistors between the uC power / ICSp and the rest of the board might solve the problem. Try 100 Ohm for a start.

\$\endgroup\$
  • \$\begingroup\$ There is nothing else on the board to draw power; and also nothing on the board to prevent power cycling. If I power the chip directly from the programmer via the ICSP header, the board should have no influence on it. I will try your suggestion of connecting the pins one-by-one and seeing when the problem starts. That's a good idea. I will try it on another copy of the board to begin with, to avoid having to remove this chip again, but if I get no errors I will desolder the chip and run the tests again. \$\endgroup\$ – Sod Almighty May 23 at 23:14

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.