I have found instructions for 8 pin Tiny but none for my 20 pin. How do I set this chip up on the breadboard for bootloading with Arduino?

  • First you need to find (or implement) an Arduino core for the MPU. After that comes the easy part - flashing the device. – Mikael Patel Jul 31 '19 at 18:40
  • @Bookshire did you "defined" attiny for Arduino IDE? have you installed ATTiny Core? – ElectronSurf Aug 1 '19 at 12:50

The principle is the same, it's all only ISP (In System Programming), and nothing different from any other microcontroller, that uses ISP. Look at the descriptions of the used pins for the 8-pin Attinys, then connect the pins with the same description on your 20-pin chip.

Namely you have to connect the pins MOSI, MISO, SCK, RESET, VCC and GND. MOSI and MISO are the data lines, SCK the clock signal. If you look into a pinout diagram or - even better - at the pin configuration diagram in the chips datasheet, you will see pins, that are marked this way. The rest of the pins is pretty much self explaining.

Since you are using an Uno as programmer and didn't have a capacitor between Reset and ground of the programmer, I will explain, why this capacitor is needed here.

The Atmega328p on the Uno doesn't have a native USB interface. So in order to connect it via USB to a PC, there is another microcontroller on the Uno (on original board the Atmega16U2), which has a native USB interface. This microcontroller then is the middleman between Atmega328P and PC. It connects to the Serial (UART) interface of the 328P and translates that to USB communication.

Everytime that the corresponding serial port is opened on the PC, the PC sends a DTR signal, which is connected to the 328P's reset pin. So, when the Arduino IDE tries to connect to the Serial port for flashing the Attiny, the Uno get's resetted and hence cannot flash the Attiny.

The capacitor between Reset and Ground will hold the Reset pin high for long enough, so that this reset does not happen and the Uno can do it's duty.

On Arduino boards with native USB interface this is not necessary, since they don't have this hardwired connection to a reset and they communicate directly over USB.

  • I have done as the instructions on arduino's site. I've used the "old style" when connecting them. First I load the sketch and then I use burn bootloader. This is the error I get: avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding – Bookshire Jul 31 '19 at 18:46
  • What do you mean by "old style"? The error shows, that you have a problem with the programmer, not with the to-be-flashed chip. I assume, that you want to use an Arduino as ISP programmer. Have you uploaded the ArduinoISP sketch to it before trying to flash the ATtiny? Also do you have the capacitor between reset and ground of the Arduino? – chrisl Jul 31 '19 at 19:03
  • Old style - Arduino homepage explaining the set up uses that terminology. Use an Arduino as ISP - Yes, you assume correct. Have you uploaded the scetch? - Yes, I am uploading the scetch to my Arduino before I try to flash. Have a capacitor between reset and GND? - No, I have not added one. I am following the instructions from Arduino's homepage. What size is the capacitor supposed to be? – Bookshire Jul 31 '19 at 19:18
  • What type of Arduino do you use as programmer? The capacitor is important for all Arduinos, that don't have a native USB interface (for example Uno or Nano). This Arduino site states 10uF for it. I used 47uF successfully for flashing an Attiny. – chrisl Jul 31 '19 at 19:33
  • I am using an Arduino Uno. I don't have capacitors of those sizes, so I will have to try this approach another day. – Bookshire Jul 31 '19 at 20:29

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.