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.
Using Arduino IDE 1.8.19 I get this error:
pymcuprog.pymcuprog_errors.PymcuprogError: UPDI initialisation failed
-
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– 6v6gt03/18/2024 05:19:46Commented Mar 18, 2024 at 5:19
-
Thank you for your response, however as per my OP I have that parameter set.mfusco– mfusco03/18/2024 13:26:17Commented Mar 18, 2024 at 13:26
-
are these header pins soldered on the PCB or you simply plug the header pins to the breadboard?hcheung– hcheung03/18/2024 14:55:14Commented Mar 18, 2024 at 14:55
-
I just have male header pins connected from the jumper cables to the breadboard.mfusco– mfusco03/18/2024 16:36:33Commented Mar 18, 2024 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– 6v6gt03/19/2024 01:44:08Commented Mar 19, 2024 at 1:44
2 Answers 2
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
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
-
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– mfusco03/18/2024 13:33:43Commented Mar 18, 2024 at 13:33
-
What IDE are you using? Arduino IDE with MegaTinyCore? or something else?hcheung– hcheung03/18/2024 14:22:29Commented Mar 18, 2024 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– mfusco03/18/2024 16:37:47Commented Mar 18, 2024 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– hcheung03/19/2024 00:09:16Commented Mar 19, 2024 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– 6v6gt03/20/2024 00:59:35Commented Mar 20, 2024 at 0:59