Author Topic: AVR ATmega328P and AVR ISP MKII - Different and last question!  (Read 4782 times)

0 Members and 1 Guest are viewing this topic.

Offline niemiroTopic starter

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
I recently asked whether if I connected the MOSI pin from an AVR ISP MKII programmer directly to the MOSI pin on an Atmel ATmega328P, did the same for the MISO, SCK and Reset pins, and connected all GNDs and VCCs to a 5V power source, this arrangement would work.

The answer I got back was that it would but it would be a good idea to put resistors and capacitors on the Reset pin and decoupling capacitors on all the GND and VCC pins.

1)   Are all these extras necessary and if so could you please link me to some schematics so that I know how to link the components together and could you please provide exact values of each of the components required i.e. “a 150ohm resistor”?

2)   How far apart are the pins on the AVR ISP MKII programmer? I was looking through my rapid catalogue for DIL headers to slot the target cable from the programmer onto, and Rapid sell two different pitches, 2mm and 2.54mm. Which size shall I buy?

Thanks in advance for any help anyone can provide.

Richard

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #1 on: April 26, 2009, 03:38:27 PM »
yes, in the last answer i forgot about it but it is somethings good to have a .1uf capacitor across the +5V and gnd lines near the microcontroller V and gnd pins. ive never heard of the one about caps on the reset...
the pins on the avr programmer are 2.54mm or .1". and to the resistors, i cant remember using any resistors unless its a home made programmer which in this case it is not. i really don't think they're necessary.
Howdy

Offline sonictj

  • Supreme Robot
  • *****
  • Posts: 416
  • Helpful? 11
    • Tim's Workshop
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #2 on: April 26, 2009, 10:46:02 PM »
a cap (.1uf) between gnd and 5+ is a good idea.  I see it in every $50 robot-esk schematic I've seen.  I also would recommend a 10k resistor connected to reset and 5+.  This is what is called a pull up resistor.  A pull up resistor is used on input pins of a device to set it high by default, and prevent the input from floating.  A pull up is used on the reset pin because reset is a low true input, meaning a reset is triggered when reset is set to ground. 

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #3 on: April 26, 2009, 11:54:46 PM »
isn't there an internal pup resistor? or is that only for I/O pins?
Howdy

Offline superchiku

  • Supreme Robot
  • *****
  • Posts: 952
  • Helpful? 5
  • cooll
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #4 on: April 27, 2009, 12:16:04 AM »
eee...betn the 5v and grnd try to use a bigger cap..a cap has many advantages...may be a 100 uf or 200 uf..ur choice...it helps a lot...
JAYDEEP ...

IT AND ROBOTICS ENGINEER

"IN THE END IT DOESNT EVEN MATTER"

Offline frank26080115

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #5 on: April 27, 2009, 08:41:23 PM »
isn't there an internal pup resistor? or is that only for I/O pins?

There is

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #6 on: April 27, 2009, 10:25:06 PM »
isn't there an internal pup resistor? or is that only for I/O pins?
There is
so the RESET pin of an AVR microcontroller has an internal pullup?
Check out the Roboduino, Arduino-compatible board!


Link: http://curiousinventor.com/kits/roboduino

www.Narobo.com

Offline SmAsH

  • Supreme Robot
  • *****
  • Posts: 3,959
  • Helpful? 75
  • SoR's Locale Electronics Nut.
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #7 on: April 27, 2009, 10:55:30 PM »
thats what im trying to find out (too lazy to look up datasheet :P)
and superchiku, isnt a big cap only to help with managing the servo noise?
Howdy

Offline Webbot

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 2,165
  • Helpful? 111
    • Webbot stuff
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #8 on: April 28, 2009, 01:57:58 PM »
My understanding is that pullups are only available on IO pins that are configured as inputs. Since the RESET needs to work at all times then I doubt it has one.

Some designs use an external pullup on the RESET pin and others (like $50 robot) don't bother. However: if you have a switch for the power then it is sometimes good to use a resistor and a cap on the reset pin so that contact bounce on the switch doesn't reboot your processor several times when power is turned on. ie have

----5v----------
           |
           |
         Resistor
           |
           |-------------> Reset pin
           |
          Capacitor
           |
           |
--- 0V -----------

So that the cap charges quickly and can still apply power to RESET during the brief moments when contact bounce would otherwise remove it.

As for other caps they are more to do with removing any high frequency spikes, or brief high current draws, on the supply. They don't have anything to do with the programmer connections.
Webbot Home: http://webbot.org.uk/
WebbotLib online docs: http://webbot.org.uk/WebbotLibDocs
If your in the neighbourhood: http://www.hovinghamspa.co.uk

Offline frank26080115

  • Supreme Robot
  • *****
  • Posts: 322
  • Helpful? 2
Re: AVR ATmega328P and AVR ISP MKII - Different and last question!
« Reply #9 on: April 28, 2009, 04:47:46 PM »
page 304 of atmega168 datasheet (under DC characteristics), reset pull-up resistor, minimum 30 kohm, maximum 60 kohm

 


data_list