Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: rbtying on September 03, 2010, 04:08:39 PM

Title: Program Atmega328
Post by: rbtying on September 03, 2010, 04:08:39 PM
Hello all,
      I'm now looking to permanently solder an Atmega328 (with Arduino bootloader) to my robot base, for use of communication through I2C.  My question is, in the case that this ATMega might need to be reprogrammed with new firmware, would it be possible to simply connect the Arduino Tx and Rx pins (0 and 1) to the corresponding pins on the Atmega, and do the same with reset?

The idea is to leverage the serial board already on the Arduino.

I don't want to, at this time, spend money on a dedicated AVR MkII ISP programmer, so any input would be greatly appreciated.
Title: Re: Program Atmega328
Post by: SmAsH on September 03, 2010, 05:04:44 PM
Maybe invest in a socket?
Title: Re: Program Atmega328
Post by: rbtying on September 03, 2010, 05:06:40 PM
I've got a few ZIF 28pin sockets, but thats the worst-case option.  Ideally I could place a 4pin header on the PCB for GND, VCC, Tx and Rx, and then just hook it up for programming, or something similar.
Title: Re: Program Atmega328
Post by: Razor Concepts on September 03, 2010, 06:19:16 PM
What you described earlier is possible, you need TX, RX, reset, ground.

By socket, we mean standard DIP socket
Title: Re: Program Atmega328
Post by: jp1390 on September 03, 2010, 06:35:25 PM
Don't solder it in! Use a DIP Socket in case the chip breaks down, so that you miss a messy de-soldering process!
Title: Re: Program Atmega328
Post by: Soeren on September 03, 2010, 07:24:07 PM
Hi,

Nothing messy in removing a dead controller. Just cut  the pins and remove them one by one, if you cannot remove it in one piece.
Title: Re: Program Atmega328
Post by: rbtying on September 04, 2010, 01:08:11 AM
When I meant solder in, I meant solder a 28pin DIP socket in and put the controller in that... It was my impression (and experience) that the sockets are quite hard to get microcontrollers out of easily, thus, I bought a few ZIFs for programming the PID control loop, which took many iterations of changing constants.

@Razor Concepts
Do I just run a jumper from Tx to Tx and Rx to Rx, and remove the exisiting uC?
Title: Re: Program Atmega328
Post by: Metal Slug 2 on September 04, 2010, 09:18:07 AM
Do you have an AVRISPmkII programmer? If yes, then why not just solder in the appropriate connections to 2*3 male pin headers so you can just plug your programmer in without having to remove the chip at all?

Download the file from the first post in this (http://www.societyofrobots.com/robotforum/index.php?topic=3292.0) thread for a visualization of the required connections.
Or, view a schematic of where the connections are needed here (http://elektro.russemotto.com/).
(the bottom right is where the pin headers go)
Title: Re: Program Atmega328
Post by: SmAsH on September 04, 2010, 04:57:58 PM
Do you have an AVRISPmkII programmer? If yes, then why not just solder in the appropriate connections to 2*3 male pin headers so you can just plug your programmer in without having to remove the chip at all?
Quote
I don't want to, at this time, spend money on a dedicated AVR MkII ISP programmer
:P

Im gonna vouch for a dip socket and the arduino method.
Title: Re: Program Atmega328
Post by: Soeren on September 04, 2010, 07:04:59 PM
Hi,

I meant solder a 28pin DIP socket in and put the controller in that... It was my impression (and experience) that the sockets are quite hard to get microcontrollers out of easily, [...]
A small wedge of metal, wood or plastic makes it a lot easier (so does a dedicated DIP removal tool of course).