Computer not recognizing MEGA 2560.

it's somehow frustrating that i encounter this problem twice but i still don't know what i did wrong to encounter or create this problem again...

like it's working a week a go (i can even change the codes as i was making the project) then suddenly you can't open the serial port of the arduino.

Is it possible that it just happen on its own because of a bad quality electronic components used for the board or etc.
Or is it normal (frequent) for Arduino clones to be like that?

Clones tend to be a little more resilient especially if they use the CH340 USB chip.

If I had to guess I would say based just on this forum that around 90% of failures were due to some form of abuse !

Sort of makes sense as to why the prices are in most aspects cheap for what these boards can actually do.

I've been using clones and official boards with the ATmega16U2 for years without ever having this problem. I also suspect a "magic smoke" incident. It is possible that the firmware on the ATmega16U2 could be somehow corrupted, though I'm not sure how that would happen. That is less likely to happen to the purpose build USB to TTL serial adapter chips like the CH340, FT232, etc. You will find some information online about flashing the ATmega16U2 firmware but people always seem to have a lot of trouble doing that and I don't remember any where it actually ended up solving this sort of problem.

can i use an arduino uno with ch340 driver to upload codes to my mega? is it possible?

It's possible. Contrary to what you might expect, you need to make the connections RX-RX, TX-TX as the pins are marked on the silkscreen of the Uno and Mega. You won't have the auto reset so you need to press the reset button on the Mega at just the right time when the upload starts, but after compilation is finished. You should turn on verbose output during upload in File > Preferences to be able to see the progress of the upload. You also need to hold the ATmega328P on the Uno in reset so that it won't interfere with the communication with the Mega.

You could also use the Uno as an "Arduino as ISP" programmer to do a Sketch > Upload Using Programmer but then you won't also be able to use the Uno to do serial communication to Serial Monitor.

All that assumes that the ATmega2560 on the Mega is not damaged.

thanks pert.
i tried using my arduino uno with ch340 to upload sketches with my arduino mega using the arduino as isp method and the tx to rx method. i can't upload the sketch.

does it possibly mean that the atmega 2560 one is broken?

Another question:

example if the atmega 2560 is not working but the atmega16u2 is working, can i still see my arduino in my computer if i connected it?

i'm suspecting that using the xl6009 dc to dc step up converter damages the atmega 16u2 as i use it to power my arduino through the power jack...
i sometimes see that when the battery is getting too low the voltage output goes to 30-40 volts but when the battery was on its nominal voltage (3.7) and up the output of the boost converter stay on the voltage on which i set around (7-10 volts) .

it's true and it happened to me. But how could a low battery outputs a big voltage in a step up converter while the nominal voltage battery and up stays to what i set it on a certain voltage.

i'm fine with disposing these boards but atleast i just want to know what lead me to these so i won't accidentally do it again. and i'll be fine with that.

But unfortunately i still don't know the errors or things ive done to led me to these hoping someone can guide me.

johnwill25:
i can't upload the sketch.

Turn on File > Preferences > Show verbose output during: > upload, try again, and then post the full error output here using code tags.

johnwill25:
does it possibly mean that the atmega 2560 one is broken?

Either that, or you did something wrong.

johnwill25:
example if the atmega 2560 is not working but the atmega16u2 is working, can i still see my arduino in my computer if i connected it?

Yes. The ATmega16U2 is what creates the virtual COM port you would see in the Arduino IDE's Tools > Port menu or Device Manager.

thanks pert. and about the dc to dc converter by the way? is it possible that it is the one that brokes the atmega 16u2 ?

The last code i uploaded to my arduino mega still works does it mean that my atmega2560 is still working...

i'm gonna post the verbose output later... im using the arduino uno (ch340 as a programmer)

is it possible to burn the bootloader of the atmega16u2 using another arduino as a programmer ? would it work?
thanks by the way so much pert.

You have to PREPARE your UNO with the ISP sketch so it knows it is going to be a programmer.

See EXAMPLES 11