Confirm setup to program Mega2560 R3 board

First, I am not using the IDE, just AVRdude to load hex file to standalone MEGA2560 R3 board. First time using anything not PIC.
I have the USB driver installed, I set the baud to 115200 in win7 device manager & avrDude, it's COM8. The board has mega16U2 USB to serial.
LED L is flashing about 1hz so it seems the 16U is programmed ok.
I am not sure what programmer to select as neither 2560 R3 or 16U are an option, so I tried many. With 'Arduino' selected seems to be "working" the best but not success.
When I clik Program I see the onboard RX LED flash 3 times (bytes 30h,20h 3 times)
avrdude.exe: stk500_recv(): programmer is not responding
avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x6d
resp= code is different each time

When I clik Detect I get some RX LED activity,
"WARNING: Unable to detect MCU"

The board is elegoo brand & advised the bootloader is installed.

If I select preset ATmega2560, it selects STK500 V2x firmware (I have to set back to com8) & I get timeout response.
If I select STK500 V1x I get the not in sync: resp-0x..

If someone can confirm the programmer I should choose, I can try re-flashing the bootloader in case its not. (I have a few boards so I can keep some as received)
Any other suggestion welcome or if any additional detail will help.

I can't upload any files yet. (logic scope RX, screen shot avrDude, )

Thanks

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

>>>: avrdude -u -c arduino -p m2560 -P COM8 -b 115200 -U flash:w:"D:\Data\_GCBasic\tm1638_OEM_Demo1.hex":i 

avrdude.exe: stk500_recv(): programmer is not responding

avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x1a



AVRDUDE killed


~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

>>>: avrdude -u -c arduino -p m2560 -P COM8 -b 115200 -U flash:w:"D:\Data\_GCBasic\tm1638_OEM_Demo1.hex":i 

avrdude.exe: stk500_recv(): programmer is not responding

avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x6d



AVRDUDE killed


>>>: avrdude -u -c arduino -P COM8 -b 115200 -p m8 

WARNING: Unable to detect MCU

The L LED is driven by the main processor (2560), not the 16U2. The pattern is the preloaded blink sketch. Therefore it's likely that the bootliader is also installed.

The RX led is driven by the 16U2, so that chip seems OK. You can further test using the loopback test; set it up, use a terminal program to connect to the board and whatever you tyoe shoukd be echoed back.

I can't check the exact command today. You will have to wait for that or till somebody else comes along. Alternatively, you can install the zip version of the IDE, enable verbose output during upload and do an upload; it will show you the exact command that is used. The zip install does not do an install, it's just a matter of extracting it and running the IDE.

Thanks,
I see the RX LED flash when typing in terminal, but no TX LED or echo.

V2 IDE wont run (starts then just sits staring at me, no menus) there are no driver folder either in the zip downloaded.
Run V1.8 Arduino IDE & load a demo sketch, setup for target board mega2560, ... still same.
I opened serial monitor from IDE for my com8 115200 before compile & upload & it displays no serial data. type & send can see the RX LED but no TX back.

Update:...
I loaded a demo sketch, setup board & processor 2560, select programmer.
I upload Using Programmer & fail same.
But when upload Ctrl+U I have success. (now am getting somewhere).
Comparing the 2 avrdude command lines the non working is using b19200 for some reason.

So I should be able to upload my hex now from command line (.bat file) & will report back...

First line is fail from 'Upload Using Programmer' Ctrl+Shift+U, second is success with 'Upload' Ctrl+U

C:\Programs\arduino-1.8.0\hardware\tools\avr/bin/avrdude -CC:\Programs\arduino-1.8.0\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cstk500v1 -PCOM8 -b19200 -Uflash:w:C:\Users\VOLCAN~1\AppData\Local\Temp\arduino_build_455741/BlinkWithoutDelay.ino.hex:i 
C:\Programs\arduino-1.8.0\hardware\tools\avr/bin/avrdude -CC:\Programs\arduino-1.8.0\hardware\tools\avr/etc/avrdude.conf -v -patmega2560 -cwiring -PCOM8 -b115200 -D -Uflash:w:C:\Users\VOLCAN~1\AppData\Local\Temp\arduino_build_848201/BlinkWithoutDelay.ino.hex:i

Using the second command line above to AvrDude & just change path to my.hex it uploads & run.
I see it has overwrite the 1s LED flash code in the 2560 with my hex.
I have realized now that I was using AvrDudess GUI app & its the config here that I need to sort. I can use a bat file for now.

sterretje, Thanks for pointing me in the right direction.

Upload using programmer uses the icsp pins. <ctrl>U uses the USB and works if you have a boot loader in the 2560 (which is usually the case with noards that you buy).

Note: if your problem is solved you can click the solution button under the most useful reply to let others know.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.