I am unable to upload any code to my Atmega328PB-MU microcontroller. However I could upload the bootloader just fine. Here is my custom board to upload the bootloader. As you can see I use a adapter to program the tiny MU versions of the Atmega328PB: enter image description here
I uploaded the bootloader with these settings:
As I said this works and I was able to upload the bootloader. However when I try to upload any code to it it fails with this well known error message: enter image description here
This is my setup for uploading the code. I want to utalize a Arduino UNO to program the chip. I removed the microcontroller from the UNO board and wired the ATMEGA328PB-MU chip to the UNO like this:
- UNO - ATMEGA328PB-MU
- 5V -> 5V
- GND -> GND
- RX -> RX
- TX -> TX
- RESET -> RESET (with 10k pull up resistor)
Below is my setup for uploading some code: enter image description here
Here is the pinout of the Atmega328PB-MU enter image description here
Things I tried:
- switching Tx and Rx
- removing the pullup resistor
- using several other chips
- using a 16mHz Xtal (with different bootloader settings)
- USB-to-Serial-Converter
Sorry for posting another Question regarding this error but everything I found online did not help me and I think I am slowly going insane. What am I doing wrong?
1 Answer 1
It seems I solved the problem. Using pins 31 and 30 for Rx and Tx seemed to be the problem. Using pins 15 and 16 of the atmega328pb-mu I could finally upload my code
-
Please mark your answer as the accepted answer.Greenonline– Greenonline02/19/2025 12:46:03Commented Feb 19 at 12:46