Hello, I've got some strange problem with my Pro Mini (16MHz 5V).
The thing is it doesn't want to program via serial, I've tried a couple of ways:
Pro Mini + USB to serial adapter based on CH340G, tx to rx and so on:
Adapter working (checked). Adapter has no DTR output pin, so I had to manually reset Arduino while on "Uploading". Howewer, it doesn't work.
The same but I've routed DTR pin from CH340G pinout:
No change, tried connecting DTR to Arduino's DTR, reset, via capacitor, neither of those worked.
Working Arduino Uno :
I removed Atmega328P from Uno and connected reset, vcc, gnd, tx to tx and rx to rx (I've tried the other way round also). The same.
Then I reuploaded bootloaders to both arduinos (bootloaders are the same) via AVR programmer (ICSP):
Uno works as usual, so BL is good. Pro Mini suprisingly accepted hex file and verified correctly but still doesn't program via serial.
Now, I tried programming compiled hex file for blink via ICSP to Pro Mini. Works.
Even if I program a sketch (via ICSP) which uses serial communication, both in and out serial works.
Now, why is that? What can be damaged in Pro Mini if it correctly programs only via ICSP (despite having properly uploaded bootloader and actually working serial pins)?
Thanks in advance for help.
Error is just programmer not responding. resp= is sometimes different:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x82
You say you burned the Uno bootloader to the pro mini? (note - it's been erased now that you uploaded blink via ICSP)
When you try to program it afterwards, do you have Uno selected or Pro Mini? You want Uno selected, since you've put the Uno bootloader on it, and uno and pro mini bootloader use different speed.
Is it an 8mhz board or a 16 mhz board? If 8, you need to make new boards.txt entry (or put the normal pro mini bootloader on it, and select pro mini when you program it, but that bootloader takes up more space and is generally worse), which is a copy of the Uno bootloader, but with the speed and upload speed halved, and a different name.
When you try to upload to it after putting Uno bootloader on it, do you get the group of 3 blinks from optiboot?
Is the pro mini blue with "dwsy_robot" on the bottom? There's a batch of those with a design flaw that made the rounds a while ago - they require modification to work, I can get the details if you have one.
Thank you, I've solved the issue!
The thing was I was improperly selecting the board. Firstly I uploaded optiboot for Uno, because my version has the same processor and is 16MHz/5V and it was fine, but I kept selecting Pro Mini board.
So: Pro mini + optiboot + selected board Uno - works.
Pro mini + ATmegaBOOT_168_atmega328.hex bootloader for Pro mini with Pro Mini selected - works.
At first I thought that the board selection is not relevant since it uses the same atmega, but yes, it makes a difference due to handing different bootloaders.