ATTiny/ISP Question

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have a very basic circuit built around an ATTiny85.

Right now, I am not using the ADC, but have plans to add that functionality in the future.

p. 123 of the complete data sheet says,

Quote:

The voltage reference for the ADC may be selected by writing to the REFS[2:0] bits in ADMUX. The VCC supply,
the AREF pin or an internal 1.1V / 2.56V voltage reference may be selected as the ADC voltage reference. Optionally
the internal 2.56V voltage reference may be decoupled by an external capacitor at the AREF pin to improve
noise immunity.

I have the attached schematic, with C9 decoupling the AREF pin.

However, when I attempt to program the chip via ISP (AVRISP mkii), it fails to enter programming mode. When I remove C9, the programming process works normally. I understand that C9 is loading down the PDI line, causing programming to fail. How then, am I to follow the recommendation in the data sheet to decouple the AREF pin? Is that not possible for actual ISP (i.e., would I need to program the board on a carrier w/o the cap, and then transfer it to the final assembly? It seems like adding a resistor in series w/ the decoupling capacitor (a la the other pins) would defeat the purpose of the capacitor in the first place.

Attachment(s): 

Science is not consensus. Science is numbers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A jumper just for ISP perhaps?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Any capacitor is going to b*gger your ISP.

You will need to ISP first, and solder the 100nF later.

Mind you, a 'strong' programmer will 'win', even with the capacitor.

A programmer with 'protection' like an AVRISP-mk2 might work if you slow the SCK frequency down.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Alas, I tried slowing the SCK down to 64kHz, to no avail. I guess I just won't stuff the capacitor until after the MCU is programmed.

Science is not consensus. Science is numbers.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Try an ArduinoISP. It takes you 10 minutes to try. I suspect that it will work even with the capacitor.

David.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If this is for production, another solution is a solder-blob-jumper in series with the Cap.

With this, you assemble the cap, but the jumper pads are open, and after PGM, you add solder to close them.

cheap and small, and you do not need to add parts after main assembly.
if you ever need to re-pgm, it is also clearer what needs to be done.