go away spammer

Author Topic: AVR ISP2 PROGRAMMER  (Read 74844 times)

0 Members and 1 Guest are viewing this topic.

Offline Nate_the_GreatTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
AVR ISP2 PROGRAMMER
« on: May 09, 2007, 03:42:54 PM »
Alright, Im hoping someone can help me out with this one:

For the $50 robot, instead of using the AVR STK Serial Port Dongle Programmer, I purchased the more expensive AVR ISP2 Programmer. Now, when I get to the part where I have to set up the programmer header the diagram shown has 10 pins (2 rows of 5), yet when I look at the ISP2 Programmer there is only room for 6 pins (2 rows of 3). I don't know which connections to make now  :P

Hoping someone out there could help me out........

Offline ed1380

  • Supreme Robot
  • *****
  • Posts: 1,478
  • Helpful? 3
Re: AVR ISP2 PROGRAMMER
« Reply #1 on: May 09, 2007, 03:51:10 PM »
use datasheets for the names of the pins and what pin should be connected to what
Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: AVR ISP2 PROGRAMMER
« Reply #2 on: May 10, 2007, 02:43:19 PM »
The more expensive programmer should come with two cables, one for 6 pin and one for 10 pin. You will have to open up the programmer and install the 10 pin cable. The instruction booklet for the programmer has pics/instructions on how to do this.

I probably should have mentioned that in the tutorial . . . Ill add it on within the next few days . . .

You also have the other option of doing some minor rewiring on the $50 robot circuit. This might give you more room on your board for future stuff . . .

Offline pelibot

  • Beginner
  • *
  • Posts: 4
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #3 on: May 10, 2007, 11:39:00 PM »

Here is a table I'm keeping for few years now. It is from the days of original AVRISP but I strongly believe nothing has changes with regards to the target connector pin assignment.

Signal : 6-Pin : 10-Pin        : I/O : Description
-----------------------------------------------------------------------------------
VCC    : 2     : 2               :  -  : Power is delivered from the target board
GND    : 6     : 3,4,6, 8,10 :  -  : Ground
MOSI   : 4     : 1               : O : Commands and data from AVRISP to target AVR
MISO   : 1     : 9               : I  : Data from target AVR to AVRISP
SCK     : 3     : 7               : O : Serial Clock, Controlled by AVRISP
RESET  : 5     : 5              : O : Reset. Controlled by AVRISP


Also, If I recall, I once opened the AVRISP case to reset it's firmware and seen two connector headers. one for 6-pin and one for 10-pin.
I use the 6-pin setup for years with mega128,mega8 and mega1281 succefully.

Hope this helps.


Offline Nate_the_GreatTopic starter

  • Jr. Member
  • **
  • Posts: 15
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #4 on: May 11, 2007, 08:12:16 AM »
OK sounds good, you guys are great!

Thanks alot!  :)

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #5 on: May 30, 2007, 08:34:03 PM »
Signal : 6-Pin : 10-Pin        : I/O : Description
-----------------------------------------------------------------------------------
VCC    : 2     : 2               :  -  : Power is delivered from the target board
GND    : 6     : 3,4,6, 8,10 :  -  : Ground
MOSI   : 4     : 1               : O : Commands and data from AVRISP to target AVR
MISO   : 1     : 9               : I  : Data from target AVR to AVRISP
SCK     : 3     : 7               : O : Serial Clock, Controlled by AVRISP
RESET  : 5     : 5              : O : Reset. Controlled by AVRISP

Cable Pin to IC Pin
1 to 18
2 to 7
3 to 19
4 to 17
5 to 1
6 to 8

looked up the datasheet for the atmega8 and matched the pin number with the Signal from this little table...
---
and then having just remembered theres a diagram just like the one I looked up right in the tutorial >_<
« Last Edit: June 04, 2007, 10:06:12 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #6 on: May 30, 2007, 08:43:43 PM »
question... how do I know which pin is which on the 3x2 cable? I know thats a pretty noobish question but since theres the 3x2 instead of like 1x6 I cant just follow the line of the ribbon... is the pin on the side of the arrow number 1 and the one adjacent to it number 2? and then the one next to 1 is 3? and adjacent to 3 is 4? and next to 3 is 5?

||||||
cable
||||||
2 4 6
1 3 5
*

*= arrow

?
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: AVR ISP2 PROGRAMMER
« Reply #7 on: May 30, 2007, 08:45:36 PM »


« Last Edit: May 30, 2007, 08:46:35 PM by Admin »

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #8 on: May 30, 2007, 08:55:37 PM »
Thank you admin =)

pin 1 is closest to the ribbon, got it =)
« Last Edit: May 30, 2007, 08:59:47 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #9 on: May 31, 2007, 06:46:36 PM »
Question, lets say I just wanted to make a circuit for the sole purpose of programming the AT mega 8.

I would only need to hook up the 3 pin header for the battery, a 3x2 header for the 3x2 cable, the 5v regulator, and the 28 pin DIP socket right?

which pin does the regulated 5v go to on the At Mega8 go to? VCC?
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: AVR ISP2 PROGRAMMER
« Reply #10 on: May 31, 2007, 09:34:20 PM »
yeap

but you may start to find it annoying to have to swap your ATmega8 back and forth after each time you program it . . .

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #11 on: May 31, 2007, 09:37:03 PM »
well im making the programming part on the same little board (I got a 756 hole board) so its really not that big a hassle :)

that way i can isolate if the problem is at the AVR or in the circuit elsewhere
« Last Edit: May 31, 2007, 09:39:01 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #12 on: June 04, 2007, 08:50:33 PM »
Admin, can you please add to the color coded circuit diagram the connections for a 3x2 programming header? That would be a big help :)

Im gunna add/compile what I can in one post just for giggles...

Cable Pin to IC Pin
1 to 18
2 to 7
3 to 19
4 to 17
5 to 1
6 to 8




« Last Edit: June 04, 2007, 10:10:02 PM by HDL_CinC_Dragon »
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline ribs

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #13 on: June 16, 2007, 11:35:32 PM »




A few questions:

1) The pin layout diagram (what's the term for that?) really helps, of course; for future reference, is there a common place to find diagrams for stuff like this?  It wasn't included in the box that my AVR programmer came in, and I searched pretty fruitlessly on the digikey site and the atmel site (I couldn't even find the ATAVRISP2 on atmel's site at all.  I just happened across this thread, which was serendipitous ;)

2) Is it normal (or am I extra dumb) for the cable to come out of the opposite side of the plug compared to the diagram?  i.e. in the bottom left image, the ribbon cable comes out of the left of the plug.  When I orient my plug such that the holes are facing me, the red stripe is on the bottom, and the little key notch thing is on the left (just like in the diagram), the ribbon cable goes out to the right instead of the left.  Is that OK/normal?

3) Are the little pin diagrams usually drawn from the perspective of the male side on the board or the female side from the cable plug?


Thanks,

--
Ken

Offline rgcustodio

  • Robot Overlord
  • ****
  • Posts: 217
  • Helpful? 0
  • Use "Search" and ye might find answers!
Re: AVR ISP2 PROGRAMMER
« Reply #14 on: June 17, 2007, 08:57:49 AM »
1) Everything you need to know _IS_ in the Atmel website. Or in the CD included with the ISP. Go to: http://www.atmel.com/products/ select Microcontrollers and DSP, select AVR 8-bit RISC, select Tools & Software, select In-System Programming. Now did you find it? Everything _IS_ there.

2) You are probably looking at the other end of the ISP cable. Open up your ISP (at your own risk) to see the other end which should match the image below. Don't bother yourself too much about these details, you'll only loose sleep.

3) Most are drawn with respect to the pint layout on the board, either male or female. You must be careful that you align pin 1, the part of the ribbon cable with the red print, of the cable to the pin 1 of the connector on the board to minimize prolonged head scratching. The pin 1 on most boards are marked by a small one or a small arrow head. That's supposed to be poke-yoke.

Good luck.
The best thing one can do when it's raining is to let it rain. - H. W. Longfellow

understanding is the path to enlightenment

Offline ribs

  • Jr. Member
  • **
  • Posts: 24
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #15 on: June 17, 2007, 02:57:53 PM »
1) Ah, you're right.  I'm really new to this stuff, so I'm not at all sure which menu items to choose sometimes (and by "sometimes" I mean "all the time".  I had tried a bunch of menus and then started just searching for "ATAVRISP2" and "AVRISP2" etc. and didn't find it (because apparently internally it's called "AVRISP MkII")

2) Yep, that makes sense.  I'll just not worry about it and count from whereever the arrow is on my plug.

Thanks!

--
Ken

Offline newbie

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #16 on: July 26, 2007, 08:18:46 PM »
i am trying to program the board below: http://www.societyofrobots.com/images/sbs_board_final.JPG i also use avr isp2 programmer but the status led does not turn green, but turn on in red colour, i followed the 6-pin instruction to modify my board, what happen to my board? i am using atmega 168-20pu , i use avr studio to program.   :'( :'( :'( urgent!!!!! it show isp mode error, it ask me to check power target...
« Last Edit: July 27, 2007, 03:13:07 AM by newbie »

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: AVR ISP2 PROGRAMMER
« Reply #17 on: July 27, 2007, 04:20:34 AM »
Make sure you are powering your board when you try and program it.

- Jon

Offline newbie

  • Jr. Member
  • **
  • Posts: 36
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #18 on: July 27, 2007, 04:43:52 AM »
yes i power my board... help

Offline JonHylands

  • Expert Roboticist
  • Supreme Robot
  • *****
  • Posts: 562
  • Helpful? 3
  • Robot Builder/ Software Developer
    • Jon's Place
Re: AVR ISP2 PROGRAMMER
« Reply #19 on: July 27, 2007, 10:24:34 AM »
Double check all the wires from the programming header are going to the correct place. Don't go by anything you have previously written down - start again from scratch.



That picture is looking down on the 6-pin header on your board, with pin 1 being on the bottom left.

- Jon

Offline oliverj4455

  • Beginner
  • *
  • Posts: 6
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #20 on: April 19, 2008, 07:42:35 PM »
I am having real trouble with this. I bought the AVR ISP mkII and I wired it up according to the diagrams above (but my cable was the other way around, pin 1 was in a different place to where it seems to be on these diagrams).

Anyway when I plug it in and turn on the power on my board the light flashes orange. This means one of 2 things:

1. ISP cable is not mounted correctly.
2. There is a problem on the reset line.

No because I am sure I wired it up properly, it must be the second problem. Now I looked this one up further and I get the following information:

As a part of checking if the ISP target cable is correctly mounted it will, after Vtarget is applied, check if the reset line has the correct voltage and check if it is possible to force this line low.

Quote
If there is no pull-up resistor on the line, i.e. if the AVRISP mkII detects 0V on reset, then the status LED will blink orange.

If the pull-up resistor on the reset line is to strong, the short circuit protection will trigger when the reset is forced low by the AVRISP mkII. 

The Reset line should not have a stronger pull up than 4.7k ohm. Any de-coupling capacitor should not be larger than 10uF.

What is a pull-up resistor? and why should I have one on the line?

Thanks :D

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: AVR ISP2 PROGRAMMER
« Reply #21 on: April 26, 2008, 06:25:58 PM »
Quote
Anyway when I plug it in and turn on the power on my board the light flashes orange. This means one of 2 things
another potential problem:
http://www.societyofrobots.com/robotforum/index.php?topic=3177.msg24456

Quote
What is a pull-up resistor? and why should I have one on the line?
http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=62607
(google knows, too)

Offline malex

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #22 on: May 31, 2008, 08:07:04 PM »
Doesn't the post from Admin and JonHylands seem to contradict?  On the admin diagram the ground ix next to reset (pin 1) and on Jon's the reset pin is diagonal from ground.

I've tried both and I get the error message "No target was detected.  Ensure the target has power."

I've measured all voltages and my regulator grounds, and connections all seem to be correct.  Could it be a software problem?

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,703
  • Helpful? 173
    • Society of Robots
Re: AVR ISP2 PROGRAMMER
« Reply #23 on: June 07, 2008, 04:46:10 PM »
lol yea Jon's is wrong . . . in fact, it contracts his included text :P

Quote
with pin 1 being on the bottom left.

Quote
Could it be a software problem?
Hmmm what programmer are you using?

Offline malex

  • Jr. Member
  • **
  • Posts: 14
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #24 on: June 10, 2008, 09:31:01 PM »
LOL, nevermind I got it working.  It turns out my voltage source isn't that well connected.  If I tap it it turns off and tap it again it turns on.  I suppose It just got moved everytime I tried it.

Offline kirit

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #25 on: November 30, 2008, 08:57:32 AM »



Before I burn the programmer/microcontroller, can someone tell me what the pin outs are for my avr is mk2. THanks. I look at the above diagram and it looks different from what i have, ive attached the file. It basically looks like my ribbon is in backwards. Do I assume that I have the following (looking into the pin holes /top view?)
---RED----|1 2|
-------------|3 4|]   <---hump
-------------|5 6|

thanks for the help, just that I searched for the info found this thread and it looks different than what I have in front of me.
« Last Edit: November 30, 2008, 08:58:27 AM by kirit »

Offline airman00

  • Contest Winner
  • Supreme Robot
  • ****
  • Posts: 3,650
  • Helpful? 21
  • narobo.com
    • Narobo.com - Mechatronics and related
Re: AVR ISP2 PROGRAMMER
« Reply #26 on: November 30, 2008, 09:57:21 AM »
your ribbon isnt backwards


thats what your ribbon is supposed to plug into ( meaning your ribbon has a female connection and that shows a male connection)

Check out the Roboduino, Arduino-compatible board!


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

www.Narobo.com

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #27 on: November 30, 2008, 10:40:31 AM »
Airman he wasnt talking about the jack that it plugs into :P
He was pointing out the fact that the orientation bump (I dont even know what its called, I just know its so it gets plugged in the right way) is on the outside relative to the ribbon rather than on the inside as depicted in the diagram

Heres why:
The side that has the bump on the OUTSIDE relative to the bump is the part that connects to the header on your ROBOT. The side with the bump in the INSIDE relative to the bump is the part that connects to the header inside the PROGRAMMER. making sure to line up pin 1 on the programmer header with the pin 1 ribbon wire (The red one)

Did I get your question right, Kirit? I popped open my programmer just to make sure I was right with what I said up there too :P

Hope this helped!
United States Marine Corps
Infantry
Returns to society: 2014JAN11

Offline kirit

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: AVR ISP2 PROGRAMMER
« Reply #28 on: November 30, 2008, 02:01:51 PM »
Airman he wasnt talking about the jack that it plugs into :P
He was pointing out the fact that the orientation bump (I dont even know what its called, I just know its so it gets plugged in the right way) is on the outside relative to the ribbon rather than on the inside as depicted in the diagram

Heres why:
The side that has the bump on the OUTSIDE relative to the bump is the part that connects to the header on your ROBOT. The side with the bump in the INSIDE relative to the bump is the part that connects to the header inside the PROGRAMMER. making sure to line up pin 1 on the programmer header with the pin 1 ribbon wire (The red one)

Did I get your question right, Kirit? I popped open my programmer just to make sure I was right with what I said up there too :P

Hope this helped!
Yep this is my problem, the hump on my ribbon is on the outside while the diagram has the hum on the inside. Im trying to understand what I should do, and Im still a bit confused. Do I have this part right:
---RED----|1 2|
-------------|3 4|]   <---hump
-------------|5 6|
where:
1- Prog_miso
2- Prog_sck
3- Prog_reset
4- Prog_vcc
5- Prog_mosi
6- Prog_gnd

thanks

Offline HDL_CinC_Dragon

  • Supreme Robot
  • *****
  • Posts: 1,261
  • Helpful? 5
Re: AVR ISP2 PROGRAMMER
« Reply #29 on: November 30, 2008, 06:18:10 PM »
When you look at both ends of the ribbon cable, is the hump on the outside on both ends?
United States Marine Corps
Infantry
Returns to society: 2014JAN11

 


Get Your Ad Here

data_list