CH340 vs Atmel possible sketch problems?

I recently fried my mega2560. It powers on and runs the last sketch I uploaded but it cannot connect to PC through USB. I've tried several different USB cables that are all confirmed working with my UNO and tried a different computer and USB ports with no luck. Any ideas what could be causing this?

I recently replaced the mega2560 with a cheapo one that has the CH340 chip. My original mega was a genuine Arduino. My sketch worked flawlessly with the genuine board but now it will not work at all with the CH340 board. I have the correct drivers installed and the CH340 board works with other sketches.

It is possible that the problem is my sketch on this cheap board? I wanted to get some other's ideas about this before I buy another one.

I'm running the latest 1.6.5 IDE on Win 7, 64 bit. I have all relevant drivers installed correctly.

Rebootload it, that should take out the question of the sketch interfering with uploading.

Thanks for the tip! This is a completely new procedure for me. I will acquire a USB tiny board and is bootload burn procedure the same for the mega as the uno, just select the mega board instead?

So this cheaper board runs everything except the one sketch you want it to run? I have not seen any boards intelligent enough to do that. Your genuie board was destroyed, by this sketch, or not? How did you tell this said sketch is not working, is it not uploading or else?

After rereading your op, I am more convinced you have a broken sketch. Start a thread in programming and post your sketch.

Hi AlphaCheese,

I had the same trouble with my arduino R3 Uno with ATmel 328p. Try make upload driver the arduino in your windows. Make the download in this chinese site: http://www.wch.cn/download/CH341SER_EXE.html

Good Luck!

liudr:
So this cheaper board runs everything except the one sketch you want it to run? I have not seen any boards intelligent enough to do that. Your genuie board was destroyed, by this sketch, or not? How did you tell this said sketch is not working, is it not uploading or else?

After rereading your op, I am more convinced you have a broken sketch. Start a thread in programming and post your sketch.

I recently got another mega board with the atmel chip. The sketch works great on it! I didn't modify anything on the sketch and it works perfectly as it did before. I'm wondering if any of the pinouts are mismatched between the two boards like chip select or something like that...

CrossRoads:
Rebootload it, that should take out the question of the sketch interfering with uploading.

I finally got a USBTiny and am getting this error when trying to flash the bootloader:

avrdude: verification error, first mismatch at byte 0x3e000
         0xff != 0x0d
avrdude: verification error; content mismatch
Error while burning bootloader.

I've installed the USBTiny drivers and the device detects in Win7. The power and "L" LED both illuminate on the Mega2560 and the "L" LED begins to flash when the error message pops up in the IDE.

I think you're running into the problem where most ISP programmers can't program chips above 128k flash correctly. There are a few fixed versions (I think an Optiloader, and a modified ArduinoAsISP sketch) that do work.