Maker Pro
Maker Pro

Help required on Atmega 2560-16AU programming.

TB1

Mar 1, 2024
1
Joined
Mar 1, 2024
Messages
1
Hi, I recently had code written for a new project. A proto type#1 PCB was also laid out and programmed by the person doing the code. Both code and PCB worked fine and some fine tuning changes to the circuitry required a new layout of the PCB. The pcb was laid out using KiCad and the Atmega 2560 circuitry was copied. After building up the board, the Atmega 2560-16AU chip was programmed by uploading the Blink sketch using an UNO as ISP to see if the Atmega 2560 on the board was working. The upload went well and the RX / TX leds on the programmer were indicating communication. The blink worked fine with the led blinking as it should. My next step was to upload the sketch (code) written for the project. To do so I had to make use of a USB-ISP programmer via Visual Studio. I uploaded the code but as soon as it passes "Auto-detected:- COM3"and gets to "Uploading .pio\build\megaatmega2560\firmware.hex" is stops and after some time the message "avrdude: stk500v2_ReceivedMessage(): timeout communicating with programmer" displays. Please can anyone tell me what is wrong and where I could start looking to find the solution. The writer of the code also tried various programmers to upload the code with no success and even after he verified the circuit to be identical to the first proto type, he can not find the cause this should happen taking into account the blink was uploaded successfully. Thank you,
 

Bluejets

Oct 5, 2014
6,916
Joined
Oct 5, 2014
Messages
6,916
If re-uploading the basic blink sketch, remember to change the delay times otherwise you have no idea if successful or not.
When reporting error messages, best to copy the complete error and paste in code tags.
That said, error does state problem communicating with the programmer so start there.
You might want to try Avrdudess...plenty of info out there on how to download and use it.
 
Last edited:

Bluejets

Oct 5, 2014
6,916
Joined
Oct 5, 2014
Messages
6,916
Bootloader not required if using hex file, usbasp programmer and AvrDudess.
 

bidrohini

Feb 1, 2023
165
Joined
Feb 1, 2023
Messages
165
Although you mentioned that the PCB layout was copied from the previous prototype, Please check the hardware. Kindly check if there is a short circuit or broken traces. You can use a multimeter or make a PCB tester like this for your convenience: https://www.pcbway.com/project/shareproject/Miniature_PCB_Tester_c2b226d2.html
Here is also a thread about the timeout message that you are seeing. Please take a look.
 
Top