Programming the Nano using external UART: Synching avrdude with my own code

Hi. I've searched for some inspiration but unfortunately the keywords I need to use throw up hundreds of useless hits mostly "I can't upload".

My project uses a Nano and an external RS232 interface. The Nano sits on a host PCB and all works fine.

For development I'm using the USB port to upload sketches but later on I'd like to use the RS232 but at this late stage I've discovered that a device reset is part of the process by means of the FTDI's DTR pin which obviously I will no longer have.

Is there a way to get around this, or is the avrdude sync process documented? I was hoping to trap a trigger code in my serial handler and jump to a reset vector or something like that.

If you have full-fledged RS232, you should have it...

Yeah, reset manually. Good luck getting the timing right though. I tried it once, but gave up very quickly.

I see where you're heading with this, but I think it'll be hard without any changes to the hardware.

But I don't :neutral_face: I'm just using the Tx & RX pins on the Nano. Obviously with hindsight I can add DTR in the future to emulate the FTDI processor reset but for now it's software or nothing.

I can upload by manually resetting but that doesn't really help me, mainly because the Nano won't be accessible once everything is reassembled. If I can't make this work it won't be the end of the world as I can cut a hole in my front panel to access the USB (this is only a hobby project), but it'd be nice for the sake of convenience.

Well, I think making USB accessible would be the most straightforward solution. Although in your place I'd be tempted to re-do the PCB :wink:

Ah well. In the end I opted to tack on a simple reset circuit with a few bits from my parts store. A bit of a bodge but works fine now, I'll do it properly next time I make any changes :slightly_smiling_face:

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