Will Arduino UNO and Arduino ATMEGA 2560 board USB port can be used to upload the compiled sketch into my new atmega2560 chip in custom board

You must get the timing right; as far as I know it's quite critical. Buy the adapter, it's always useful and saves you the headache; make sure that you get the one with the DTR pin broken out.

1 Like

I have designed the custom board using the chip atmega2560 without the usb port. Kindly recommend any official USB to TTL programmer to program via serial port(TX & RX pins) into my new chip atmega2560.

Are you sure that your chip has a bootloader? Perhaps it would be better to upload via ICP interface?

There is no "official programmer" for this purpose, you can use any USB to TTL module

1 Like

Hi sir, Thanks for the reply.

I have usbasp programmer in which i have burn the bootloader into it and the bootloader is successfully done. Can you please share the pin connection details of usb to ttl --> new chip atmega2560. This will helps out.

Mega   USB_TTL
5v        5v
GND       GND
RX0(PE0) - TX
TX0(PE1) - RX
1 Like

Hi sir, Thanks for the reply.

I am planning to buy this USB to TTL convertor:

I am using windows 10 64 bit os.

Will this suitable for programming my new chip atmega2560 via tx and rx pin.

@prakashvenugopal ,

Your two or more topics on the same or similar subject have been merged.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Please create one topic only for your question and choose the forum category carefully. If you have multiple questions about the same project then please ask your questions in the one topic as the answers to one question provide useful context for the others, and also you won’t have to keep explaining your project repeatedly.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

1 Like

The image shows the word DTR so it should be OK.

1 Like

Hi sir. Thanks for merging the topics. Will follow the same.

Hi Sir. I bought the USB to TTL Convertor with DTR Pin and i have connected as:

FTDI (Usb to TTL Convertor) to Atmega2560
5V --> 5V
Gnd --> Gnd
TX --> RX
RX --> TX
DTR --> Reset pin of Atmega

I tried to upload the sketch, it is showing the Error as follows:

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Users\prakash\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM6
     Using Programmer              : wiring
     Overriding Baud Rate          : 115200

avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer

avrdude done. Thank you.

Failed uploading: uploading error: exit status 1

What could be problem. Kindly let us know.

If the board has the bootloader, I really do not know, sorry.

1 Like

Hi Sir, Thanks for the reply. The Board has already burned with the Usbasp Programmer.

Sir. What is the reset circuitry recommended for Atmega2560 ? Normally the reset pin is High. While uploading the code, the reset pin is gets low continuously. Is this correct or reset have to the release to high? Kindy let u know.

Look at the schematic of the Uno/Mega; there is a capacitor that will result in a spike to GND when DTR is activated, not a permanent LOW level. A permanent LOW will keep the 2560 in reset so uploads are not possible.

In reply #11 I mentioned that a schematic of your 2560 board would be useful; unless I'm blind, you did never provide one.

1 Like

Hi Sir, Thanks for the reply.

I had attached the schematic for your reference.
30th pin of atmega2560 is the reset pin.
I had used Resistor 1k (R24) and Capacitor 0.1 uf (C19) in the reset pin.
1k (R24) is pulled up to 5V and 0.1 uf(C19) to Gnd.
I had used the Diode 1N4148 (D7) to the reset pin to VCC.

What is the Change i have to do in the Reset Circuitry in the atmega250 to interface to DTR pin of USB to TTL Convertor. Kindly let us know.

Reset Circuit.pdf (93.8 KB)

Hi sir, Added to that, I had removed the DTR pin from the Reset pin of ATmega2560 & tested the DTR Pin alone with the oscilloscope. During Normal, DTR pin is high. while giving the Upload, DTR pin is continuously gets low and it is not getting to High after Low.
This test is done with the DTR Pin without connecting to the Reset pin of the Atmega2560. DTR pin have to release to high after Low?

You normally need a 100nf capacitor inline between the DTR and Reset pins. As @sterretje said in post #33, "look at the schematic of the Uno/Mega".

1 Like

arduino-mega2560-schematic.pdf (307.9 KB)

Hi sir, thanks for the reply.

Schematic of arduino mega is attached.
C1 = 22pf (grounding cap)
C7 = 0.1 uf (series capacitor)
Reset pullup resistor = 10k from reset pin

I will try with 0.1 uf series cap in DTR of USB to TTL convertor to Reset pin of atmega2560.
22pf ground cap is also needed for this?

Added to that. Why i am asking we can use this 22pf cap or not is, recently i refer one promini circuit in which usb to ttl convertor(FTDI) is used to program the promini board. In that only inline cap 0.1 uf is used. Not a gnding capacitor.

I had attached the promini circuit for your reference:

Hi Sir,

After Introducing the 0.1 uf capacitor inline cap and 22pf grounding cap as the circuit of Mega. The Chip Atmega2560 is uploaded with the blink.ino sketch successfully by using the USB to TTL Convertor with DTR Pin.

Compiled and Code upload reference:

avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "C:\Users\prakash\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

     Using Port                    : COM7
     Using Programmer              : wiring
     Overriding Baud Rate          : 115200
     AVR Part                      : ATmega2560
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PA0
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
       flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
       lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : Wiring
     Description     : Wiring
     Programmer Model: AVRISP
     Hardware Version: 15
     Firmware Version Master : 2.10
     Vtarget         : 0.0 V
     SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: reading input file "C:\Users\prakash\AppData\Local\Temp\arduino\sketches\0876148198F861403891F59CC10C73D9/Blink.ino.hex"
avrdude: writing flash (1536 bytes):

Writing | ################################################## | 100% 0.38s

avrdude: 1536 bytes of flash written

avrdude done. Thank you.

Whenever i open the blink.ino sketch, DTR pin is High Normally and during the Upload button press, DTR pin is low for 1 sec and it returns to high. in this case, upload code is success.

My Problem is, when i open my own Sketch, DTR pin is Low Normally and during the upload button press, DTR pin is high for 1 sec and it returns to low. In this case, upload code is not success.

I tried with 2 nos of usb to TTL Convertor, the result is the same.
Whenever i try to open the blink.ino sketch, DTR pin is high.
Whenever i open my code, the DTR pin gets low due to this ,uploading is not succeeded. What could be the Problem. Any setting to be used in the Arduino IDE. Please let me know.

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