2

I have this ATtiny1616 breakout board, and I'm attempting to upload an Arduino sketch to it following this documentation, but I'm getting the error "A programmer is required to upload" upon uploading a simple blink sketch. I have the following parameters set in the IDE:

  • Board: ATtiny
  • Chip: Attiny1616
  • Programmer: Serial UPDI: Slow 57600 baud

I am using this USB-Serial adapter and it is connected to the ATtiny like so:

  • USB Vcc -> Vin

  • USB GND -> GND

  • USB RX -> 1k OHM

  • USB TX -> 1k OHM

  • 1k OHM -> UPDI

And I have an LED connected to pin 5 of the ATtiny:

  • PIN 5 -> LED -> 220 OHM -> GND

Below is the circuit. I also thought that maybe I had RX and TX mixed up, so I tried switching those connections but that didn't work either.

enter image description here

Using Arduino IDE 1.8.19 I get this error:

pymcuprog.pymcuprog_errors.PymcuprogError: UPDI initialisation failed
7
  • The error message seems to imply that you have not selected an appropriate programmer from the list available in the IDE tools menu ( bottom of page). The Adafruit recommendation (your link) is SerialUPDI - SLOW: 57600 baud.
    – 6v6gt
    Commented Mar 18 at 5:19
  • Thank you for your response, however as per my OP I have that parameter set.
    – mfusco
    Commented Mar 18 at 13:26
  • are these header pins soldered on the PCB or you simply plug the header pins to the breadboard?
    – hcheung
    Commented Mar 18 at 14:55
  • I just have male header pins connected from the jumper cables to the breadboard.
    – mfusco
    Commented Mar 18 at 16:36
  • I guess then you are using Arduino IDE 2.x. There is a known behaviour difference between that and 1.x which can cause confusion leading to your error message. See forum.arduino.cc/t/a-programmer-is-required-to-upload/1101631 . If this solves it then write your own answer with a bit more detail.
    – 6v6gt
    Commented Mar 19 at 1:44

2 Answers 2

1

Please make sure that your USB to serial adapter is working well. If the adapter itself is faulty, it can create problems. Also, check if you have all the necessary drivers installed.

Here is another tutorial regarding how to program the ATTiny1616 Breakout board using the MegaTinycore library. You can find it here :
https://www.pcbway.com/project/shareproject/ATTiny1616_Minimal_Breakout_board_QFN_bad990fc.html

0

In order to use a USB-Serial adapter as a SerialUPDI programmer, it needs to wire it as the diagram shown below

                        Vcc                     Vcc
                        +-+                     +-+
                         |                       |
 +---------------------+ |                       | +--------------------+
 |                     +-+                       +-+                    |
 |                     |      +----------+         |                    |
 |                  TX +------+   1k     +---------+ UPDI               |
 |                     |      +----------+    |    |                    |
 | USB-Serial Adaptor  |                      |    |  Target AVR Board  |
 |                     |                      |    |                    |
 |                  RX +----------------------+    |                    |
 |                     |                           |                    |
 |                     +--+                     +--+                    |
 +---------------------+  |                     |  +--------------------+
                         +-+                   +-+
                         GND                   GND
6
  • Thank you for your response, however upon connecting the ATtiny as described in your post I'm still getting the same error. I'm updating my OP with a picture of my connections.
    – mfusco
    Commented Mar 18 at 13:33
  • What IDE are you using? Arduino IDE with MegaTinyCore? or something else?
    – hcheung
    Commented Mar 18 at 14:22
  • Yes, I'm using the Arduino IDE with MegaTinyCore. I also would like to note that in attempt to getting it to work, I pressed the "Burn bootloader" button, when using an Arduino to try to connect to the ATtiny. Could that have messed something up?
    – mfusco
    Commented Mar 18 at 16:37
  • No idea. I never use the boot loader. In fact, I nowadays don't even use MegaTinyCore and Arduino IDE often, I mostly just have VS Code, AVRDude and bare metal. I think you should consider soldering the header to the board, the problem you are facing might just be bad connection.
    – hcheung
    Commented Mar 19 at 0:09
  • "burn bootloader...". This can cause a problem if it succeeds in uploading a bootloader because it has the potential to convert the updi pin to a reset pin preventing further updi programming and needing a high voltage programmer to undo it. However, if you chose the board variant something like "attiny 1616 without optiboot " then "burn bootloader..." simply updates fuses. On these Attinys with a low pin count a bootloader is not recommended. The term "burn bootloader" in the IDE causes much confusion because it may not mean burn bootloader.
    – 6v6gt
    Commented Mar 20 at 0:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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