Programming an ATMEGA2560-16AU on a custom PCB via TX0/RX0

Hi All,

On an Arduino Mega 2560 Rev 3, it is possible to load sketches into the uC by connecting an external USB/TTL converter to TX0/RX0 pins, the only requirement from the user is to hold the reset button down whilst the sketches compiles, and let go before the upload starts. I have tested this, and this method works no problem.

However, this doesnt work on my own custom board which is using the same uC from the Mega 2560 rev 3. I believe this must be down to the fact that the brand new / blank uC has no bootloader and therefore isnt able to load code from the UART port and according to the uC datasheet, can only load code from the SPI bus or JTAG interface.

I am using the SPI bus in my application for a W5100 interface chip, and so i want to program via UART pins RX0/TX0 as SPI bus will be busy servicing the W5100.

Does anyone else have experience of this issue / can help out? or confirm/deny my theory?

Thanks :slight_smile:

Have you pre-installed a bootloader in the chip ? (Optiboot etc)

Then you can use the pre-execution serial boot method - like the standard Arduino boards have installed.

I havent pre-installed a bootloader in the chip.

Then that’s what you MUST DO, you’ll need an ICSP programmer to program a brand new chip.

ok, thanks for the help.

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