I probably bricked my first Arduino Uno Rev3 (the original one).
I can't upload sketch (avrdude: stk500_recv(): programmer is not responding). But if I put out and programmed Atmega328 on breadboard using another arduino it works (I have checked few different scripts, using digital/analogue pins or even i2c).
So I have assumed that mega16u2 is fried. I have replaced it (and used flip to upload firmware hex). But I still can't upload the sketch.
I have done loopback test and it is working. Is it possible that loopback test passes if mega16u2 is not soldered properly or damaged?
What else could I checked or try to replace on board?
How did you do that? Did you connect the RX and TX pins, or did you upload the "ArduinoISP" sketch to the other Arduino board and do an "Upload Using Programmer"?
No way. Loopback test: you type something in terminal app. , data are going to the usb/serial transceiver (it is actually 16U2), Tx to Rx on the 16U2, back to the usb a and finally, data land in the terminal app.
Just another thing, the reset pulse. It also goes via the 16U2. With any cheap DM should be visible the voltage drop at the upload process start.
Another possible problems related to the 328P: missing bootloader, missing clock signal, power, reset must be H except during the reset pulse.
"With any cheap DM should be visible the voltage drop at the upload process start"
Where should I measure the voltage? On mega 16u2?
"missing bootloader" I think it is not a case - I can juggling ATmega328 between my other arduino boards and they working...
"missing clock signal" how can I check it?
"power" some more details are needed, I probably bricked it in a first way because I attached usb cable when my arduino was attached to some other power source, but the board is working (if I programmed ATmega on other board)
"reset must be H except during the reset pulse" without more details I do not know how to check it...
What's about the reset button, do you see the dropout? It should be.
Reset pulse is essential for uploading to start the bootloader. Avrdude (run by IDE) on PC generates pulse 200ms on DTR and RTS. Should be visible on DMM. Or try LED with serial resistor of course. 200ms is fair enough to observe that blink.
Anyhow, if it is uploading now so the RESET pulse should be fine.
If I press reset button led (the one which is blinking in blink sketch - pin 13) blinks.
I am wondering if everything with Flip is ok. Because If I attached my working Arduino Uno then I can see bootloader ver 1.2.0 and Devive Boot Ids DC FB, but If I attached my not working Arduino Uno I can see bootloader ver 1.0.0 and Device Boot Ids 00 00.
From the other hand, If I erase mega 16u2 in Flip windows does not see the device. And if I upload firmware I can see VID 2341 and PID 0043 and windows recognize Arduino/Genuino Uno.
I have written simmple sketch and uploaded to my working Arduino Uno
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay(1000);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println("hello");
delay(1000);
}
Then I took out ATmega328p (with this sketch) and put into my not working Arduino Uno.
On Serial Monitor I could observe that each second character "=" appeared (without new line).
So what could be the reason that ATmega328 and Mega 16u2 do not understand each other?
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x3d
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x3d
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x7d
There is no message "programmer is not responding".