Go Down

Topic: Uploading a skectch into atmega328 that has uno bootloader and is in circuit (Read 1 time) previous topic - next topic

Tomppu

Hello,
I managed to burn Uno bootloader into a plain atmega using the my Arduino Mega1280 and the arduino as isp tutorial. Now I have a gadget were the arduino is located and would like to upload sketches using the Uno board. Am I wrong or shouldn't this be possible by just removing the atmega from the uno board and connecting reset, tx,rx,+5,GND to the chip that is on the gadget.

I think this would be a pretty easy way to get the code into the gadget.

Any ideas?

Best Regards,

Tomas
ps Images are nice so I atached a picture of my RGB led light prototype.

retrolefty

Quote
Now I have a gadget were the arduino is located and would like to upload sketches using the Uno board. Am I wrong or shouldn't this be possible by just removing the atmega from the uno board and connecting reset, tx,rx,+5,GND to the chip that is on the gadget.

I think this would be a pretty easy way to get the code into the gadget.


Yes, it is that simple and should work fine. Even simpler is to just plug a jumper wire between ground and the reset pin on your UNO. That will hold the chip in reset mode, but still leave the tx,rx,+5, and ground pins free to wire to your standalone UNO chip.

Lefty


giantsfan3

I'm thinking what you guys are describing is, e.g., the breadboard circuit in this tutorial (with arduino pin 10 to reset, and pins 11, 12, and 13 the serial programming pins) am I right?:
http://arduino.cc/en/Tutorial/ArduinoISP

If so... I'm a little confused on what exactly is happening differently (in context of Arduino-as-ISP) between writing programs to the chip on the Arduino board vs. writing programs to the external chip?
I'm guessing it's related to Reset... what precisely is the function of reset here?

Based on what I've understood, reset serves to trigger the microcontroller to re-initialize, thus be open to (with the original bootloader still in place) new uploads, or if nothing is incoming, just lets it re-run the existent program in its memory. So, when @retrolefty suggested grounding the Reset pin on the arduino while loading programs to an external chip, what does that do?
(Reset is active low based on datasheet, so I understand somewhat...)

spycatcher2k

To upload to your standalone :
(ard - Arduino & std - stand alone)

ard rx - std tx
ard tx - std rx
+5 to +5
gnd to gnd

no power on std
short ard reset to ard gnd

remember to select the type of chip you are uploading to
click upload on IDE
wait for sketch size
tap std reset quickly

Drew.
Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

alparent


Quote
Now I have a gadget were the arduino is located and would like to upload sketches using the Uno board. Am I wrong or shouldn't this be possible by just removing the atmega from the uno board and connecting reset, tx,rx,+5,GND to the chip that is on the gadget.

I think this would be a pretty easy way to get the code into the gadget.


Yes, it is that simple and should work fine. Even simpler is to just plug a jumper wire between ground and the reset pin on your UNO. That will hold the chip in reset mode, but still leave the tx,rx,+5, and ground pins free to wire to your standalone UNO chip.

Lefty


From my experience you also need a jumper wire from the Uno board reset to the reset pin of the stand alone chip. So leaving the chip in with a jumper from between GND and reset wouldn't work. I take the chip off the board. But like I say ....... that's my experience! Maybe I'm just about to learn a simper way of doing this?


I'm thinking what you guys are describing is, e.g., the breadboard circuit in this tutorial (with arduino pin 10 to reset, and pins 11, 12, and 13 the serial programming pins) am I right?:
http://arduino.cc/en/Tutorial/ArduinoISP


No it's not.

It's more like this http://arduino.cc/en/Tutorial/ArduinoToBreadboard Look at the Uploading Using an Arduino Board section.

You take the Arduino as ISP to put the bootloader on the chip.
After the chip as a bootloader on it you don't need an ISP anymore (that's why you can put stuff on the chip on the Uno board without needing another board.)

So when you have an external chip with a bootloader. You put your sketch on it the same way you put it on your board. Except it's not ON the board, it's off the board with a couple of jumpers....so the Arduino IDE doesn't know it's off the board.......and it doesn't care!

Go Up