Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: niemiro on April 26, 2009, 05:24:26 AM

Title: AVR ATmega328P and AVR ISP MKII
Post by: niemiro on April 26, 2009, 05:24:26 AM
If I were to buy an AVR ATmega328P microcontroller and an AVR ISP MKII programmer,

1: Would AVR Studio support this configuration?

2: It appears that if I connect the MISO pin on the target cable from the programmer to the MISO pin on the microcontroller , do the same for the Reset, SCK and MOSI pins and connect both GNDs and VCCs to a 5V power source, this arrangement should work without needing any other components i.e. resistors. Please could you correct me if this is wrong? If I do need other components, what are they?

3: On Atmel’s website, on the second page of the datasheet summary for the ATmega328P, (http://www.atmel.com/dyn/resources/prod_documents/8025s.pdf (http://www.atmel.com/dyn/resources/prod_documents/8025s.pdf)), it has the pin layout for the microcontroller. The rectangular package was labelled PDIP. Why is it labelled this because I thought the 328P came in a DIL-28 package and would I have to connect both GND labelled pins on the microcontroller to the negative terminal on the power source?

Thanks so much in advance for anyone who can help me.

Richard
Title: Re: AVR ATmega328P and AVR ISP MKII
Post by: SmAsH on April 26, 2009, 05:34:19 AM
1. yes it would.
2. yes, a 5V regulated power supply would be needed but it is also good to have some things to test that the programming worked, ie. leds.
and maybe a pcb is a help to sorta hold the chip in place...
3. pdip is the 28pin dip package... tqfp stands for "something quad flat package" which is a surface mount version. same with the other two square ones which i think "MLF" stands for micro-lead-frame. and yes all grounds need to be connected to something called common ground, battery negative usually goes to this as well.
Title: Re: AVR ATmega328P and AVR ISP MKII
Post by: hazzer123 on April 26, 2009, 05:49:22 AM
From the block diagram in the Atmega datasheet that the two GNDs are slightly different. The chip has separate power pins for the ADC, so one GND is the typical ground for the MCU, the other (near AVcc i suspect) is ground for the ADC.

Generally though, all GNDs in a circuit are common so it's best to connect them together. AVcc should also be externally connected to Vcc, even if you don't plan on using the A/D convertor.
Title: Re: AVR ATmega328P and AVR ISP MKII
Post by: niemiro on April 26, 2009, 06:48:41 AM
Thanks very much. Exactly the sort of answer I was looking for.

Thanks again.

Richard :)