Uploading code to AtMega32 with Arduino IDE

I've made my own microcontroller board featuring atmega32 and I flashed a bootloader to it using MightyCore library. Now I'm trying to upload a simple blink sketch to it, but I can't seem to be able to. In my boards manager I selected Atmega32 as my board, I select the correct port(COM8, I can see it in device manager) and when I hit upload it says compilation complete, but after some time i get this:

Compilation complete.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x7f
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x7f
Upload error: Error: 2 UNKNOWN: uploading error: uploading error: exit status 1

Hopefully this is a prototype on breadboard or strip board and any wiring faults can be corrected before you design a PCB.

Please post your schematic.

Everything was wired accordingly to this schematic: https://camo.githubusercontent.com/4347b256f5ea0c2b7b98a872738b347d00193dec57eff10f279e5ee005385592/68747470733a2f2f692e696d6775722e636f6d2f35614b4c5270302e706e67

I've checked my connections multiple times and I'm sure that everything is connected as it should be. I'm not sure if I have to choose Atmega32 from MightyCore library or if I have to install a different one.

Schematic looks ok.

Did you try uploading blink sketch using your ISP programmer?

(If you do that, don't forget that this will overwrite the bootloader, so you will need to re-flash the bootloader again afterwards.)

I have never used MightyCore, only MiniCore. Unfortunately, MiniCore does not list atmega32 as being supported.

NVM, I'm an idiot, I connected RX to Rx and TX to TX instead of RX to TX and TX to RX.

Ah, the dangers of posting someone else's schematic! I did check for exactly that error on the schematic you posted, and of course it was fine.

Out of interest: why did you choose ATmega32 over the more usual atmega328?

Hi, sorry for the late reply. I used it because it has more I/O pins.

Oh, ok. I usually like to find ways to use fewer pins, either by careful choice of the other components in the circuit, or by using I/o extender chips etc. which use i2c or SPI bus, which allows me to stick with a more familiar MCU chip, and often helps simplify the wiring too. But sometimes I guess there is no good substitute for simply having more I/o on the MCU chip.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.