1
\$\begingroup\$

I have been trying for quite some time to program a factory-new ATtiny20. After unsuccesfully trying with a USBASP and with ArduinoISP, I decided to take a look with my scope. Turns out the device is responding, but the voltage on the MISO pin only reaches about 1 V peak. This is not enough to communicate succesfully. Any ideas of what could be causing this?

Things I've tried:

  • Use a USBASP programmer
  • Use Arduino UNO as ISP with ArduinoISP (this is supposed to set the clock speed slow enough for a ATtiny85 @ 1 MHz, so should also be slow enough for this ATtiny20)
  • Add pull-up resistor of values 10 kOhm and 100 kOhm to MISO, this causes the MISO line to always stay high
  • Add pull-up to SS pin
  • Add pull-down to SS pin
  • Try another ATtiny20, exact same behaviour
  • Check the wiring, many times
  • Disconnect MISO to make sure there's not something else pulling it low
  • Measured at the ATtiny MISO pin directly, to ensure it's not a connection problem

Other observations:

I measured the SPI clock frequency to be about 130 kHz. The frequency of the signal on the MISO line has the same frequency so it looks like the device is responding correctly (although I did not check that the data is exactly what it should be), just with a much lower voltage.

MISO line

Overview, on the left the ATtiny20 soldered to a adapter board, on the right the Arduino Uno SMD

edit: I had the RESET pin connected to the RESET pin of the Arduino ISP header, whereas it should have been connected to pin 10. Changing this did, however, not fix my issue. The wiring is as shown below. enter image description here

\$\endgroup\$
  • 2
    \$\begingroup\$ I suspect we need a schematic of what you [think you] have wired up here. \$\endgroup\$ – DiBosco Oct 9 '18 at 16:03
  • \$\begingroup\$ –RESET held low? \$\endgroup\$ – Janka Oct 9 '18 at 16:11
  • \$\begingroup\$ You're using that Arduino as the ISP? The RESET pin on the ICSP header won't work as an output, the ArduinoISP sketch uses one of the digital outputs to hold the RESET on the target low. arduino.cc/en/Tutorial/ArduinoToBreadboard \$\endgroup\$ – Phil G Oct 9 '18 at 21:59
  • \$\begingroup\$ I was using the RESET pin on the ICSP header, changing it to pin 10 as per the ArduinoISP sketch did however not fix my issue. I have added a wiring diagram. \$\endgroup\$ – Jim Daniël Teunis Oct 11 '18 at 8:13
0
\$\begingroup\$

The problem was that I was trying to program the chip using ISP, but this chip does not support that programming method. I has to be programmed using the TPI interface.

\$\endgroup\$

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.