Writing sketch to standalone project

I have built a standalone board for my project which works fine, but everytime I tweak the sketch, I have to remove the PCB from it's case, remove the Atmega chip and fit it into a Arduino Uno board, upload the new amended sketch, and then replace the chip back in my project board, etc. I have done this several times now and almost snapped pins off on two occasions, and was looking for a way in which I could upload the sketch without removing the chip.

If I remove the Atmega from my Arduino Uno board, and connect is follows, will it work! Connections Arduino Rx pin to standalone Pin 3 Arduino Tx pin to standalone Pin 2 Arduino 5v pin to standalone 5v Arduino Gnd to standalone Gnd

Have you looked at this page? http://arduino.cc/en/Tutorial/ArduinoISP

PaulS: Have you looked at this page? http://arduino.cc/en/Tutorial/ArduinoISP

Yes, but isn't that tutorial for burning the bootloader? I already have a bootloader installed in the 'standalone' chip, I just need to upload a revised sketch.

Simple (kind of), wire a jumper on the Arduino Uno from ground pin to reset pin. That will prevent the Uno’s bootloader program on the Uno from responding to the upload request. Now reverse the send and rec wires on the standalone board. Now however you won’t be able to rely on the auto-reset function for your standalone arduino. You will have to do a manual reset to upload. Press and hold reset button on the standalone, hit upload on the IDE and when you see the compiled memory size printed in the IDE, release the reset button.

Lefty

retrolefty: Simple (kind of), wire a jumper on the Arduino Uno from ground pin to reset pin. That will prevent the Uno's bootloader program on the Uno from responding to the upload request. Now reverse the send and rec wires on the standalone board. Now however you won't be able to rely on the auto-reset function for your standalone arduino. You will have to do a manual reset to upload. Press and hold reset button on the standalone, hit upload on the IDE and when you see the compiled memory size printed in the IDE, release the reset button. Lefty

Thanks Lefty The chip has been removed from the Arduino, so is it still necessary to wire the jumper from gnd to reset pin? As for the wiring details, is my sketch below correct, ie Rx (arduino) to Tx (standalone), and Tx (arduino) to Rx (standalone), as well as 5V and Gnd.

The chip has been removed from the Arduino, so is it still necessary to wire the jumper from gnd to reset pin? As for the wiring details, is my sketch below correct, ie Rx (arduino) to Tx (standalone), and Tx (arduino) to Rx (standalone), as well as 5V and Gnd.

If the chip has been removed from the Uno there is no need for the ground to reset jumper. If that is the case then if you wire a jumper from the Uno reset pin to the standalone reset pin, then the auto-reset feature should work and you won't have to use the manual reset procedure when uploading.

And no, your Rx and Tx wiring shown is not correct if the goal is to upload sketches to the standalone, using the Uno's USB serial connection to the PC. Wiring for that requires Tx to Tx and Rx to Rx.

The wiring you show is correct if the goal is to have sketches on both the Uno and standalone talk to each other using serial commands.

Lefty

retrolefty:

The chip has been removed from the Arduino, so is it still necessary to wire the jumper from gnd to reset pin? As for the wiring details, is my sketch below correct, ie Rx (arduino) to Tx (standalone), and Tx (arduino) to Rx (standalone), as well as 5V and Gnd.

If the chip has been removed from the Uno there is no need for the ground to reset jumper. If that is the case then if you wire a jumper from the Uno reset pin to the standalone reset pin, then the auto-reset feature should work and you won't have to use the manual reset procedure when uploading.

And no, your Rx and Tx wiring shown is not correct if the goal is to upload sketches to the standalone, using the Uno's USB serial connection to the PC. Wiring for that requires Tx to Tx and Rx to Rx.

The wiring you show is correct if the goal is to have sketches on both the Uno and standalone talk to each other using serial commands.

Lefty

That's great, many thanks.

Lefty, Just made up the leads and it works great, new sketch uploaded without any problems. This will save me a lot of time, and take the risk away from damaging the chip or wearing out the sockets.

Many Thanks