Author Topic: Program Atmega328  (Read 3826 times)

0 Members and 1 Guest are viewing this topic.

Offline rbtyingTopic starter

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Program Atmega328
« 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.

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Program Atmega328
« Reply #1 on: September 03, 2010, 05:04:44 PM »
Maybe invest in a socket?
Howdy

Offline rbtyingTopic starter

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Program Atmega328
« Reply #2 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.

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
    • RazorConcepts
Re: Program Atmega328
« Reply #3 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

Offline jp1390

  • Jr. Member
  • **
  • Posts: 19
  • Helpful? 0
Re: Program Atmega328
« Reply #4 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!

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Program Atmega328
« Reply #5 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.
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives

Offline rbtyingTopic starter

  • Supreme Robot
  • *****
  • Posts: 452
  • Helpful? 31
Re: Program Atmega328
« Reply #6 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?

Offline Metal Slug 2

  • Supreme Robot
  • *****
  • Posts: 333
  • Helpful? 11
Re: Program Atmega328
« Reply #7 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 thread for a visualization of the required connections.
Or, view a schematic of where the connections are needed here.
(the bottom right is where the pin headers go)
« Last Edit: September 04, 2010, 09:19:46 AM by Metal Slug 2 »

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: Program Atmega328
« Reply #8 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.
Howdy

Offline Soeren

  • Supreme Robot
  • *****
  • Posts: 4,672
  • Helpful? 227
  • Mind Reading: 0.0
Re: Program Atmega328
« Reply #9 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).
Regards,
Søren

A rather fast and fairly heavy robot with quite large wheels needs what? A lot of power?
Please remember...
Engineering is based on numbers - not adjectives