Society of Robots
     | Robot Forum | Robot Tutorials | Robot FAQ |
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 21, 2009, 10:52:49 AM

Login with username, password and session length
Search:     Advanced search
SoR Robot Chat every friday night. Join us!
http://www.societyofrobots.com/robotforum/chat/

Robot Forum
72,683 Posts in 9,271 Topics by 5,293 Members
Latest Member: billcpb78
* Home Help Help Login Register
0 Members and 2 Guests are viewing this topic.
Pages: [1] 2 3 Print
Author Topic: AVR ISP2 PROGRAMMER  (Read 26371 times)
Nate_the_GreatTopic starter
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 15


View Profile
« on: May 09, 2007, 02: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  Tongue

Hoping someone out there could help me out........
Logged
ed1380
Supreme Robot
*****

Helpful? 2
Offline Offline

Posts: 1,458



View Profile
« Reply #1 on: May 09, 2007, 02:51:10 PM »

use datasheets for the names of the pins and what pin should be connected to what
Logged

Problems making the $50 robot circuit board?
click here. http://www.societyofrobots.com/robotforum/index.php?topic=3292.msg25198#msg25198
Admin
Administrator
Supreme Robot
*****

Helpful? 62
Offline Offline

Posts: 8,613



View Profile WWW
« Reply #2 on: May 10, 2007, 01: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 . . .
Logged

pelibot
Beginner
*

Helpful? 0
Offline Offline

Posts: 4


View Profile
« Reply #3 on: May 10, 2007, 10: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.

Logged
Nate_the_GreatTopic starter
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 15


View Profile
« Reply #4 on: May 11, 2007, 07:12:16 AM »

OK sounds good, you guys are great!

Thanks alot!  Smiley
Logged
HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #5 on: May 30, 2007, 07: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, 09:06:12 PM by HDL_CinC_Dragon » Logged
HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #6 on: May 30, 2007, 07: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

?
Logged
Admin
Administrator
Supreme Robot
*****

Helpful? 62
Offline Offline

Posts: 8,613



View Profile WWW
« Reply #7 on: May 30, 2007, 07:45:36 PM »



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

HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #8 on: May 30, 2007, 07:55:37 PM »

Thank you admin =)

pin 1 is closest to the ribbon, got it =)
« Last Edit: May 30, 2007, 07:59:47 PM by HDL_CinC_Dragon » Logged
HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #9 on: May 31, 2007, 05: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?
Logged
Admin
Administrator
Supreme Robot
*****

Helpful? 62
Offline Offline

Posts: 8,613



View Profile WWW
« Reply #10 on: May 31, 2007, 08: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 . . .
Logged

HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #11 on: May 31, 2007, 08: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 Smiley

that way i can isolate if the problem is at the AVR or in the circuit elsewhere
« Last Edit: May 31, 2007, 08:39:01 PM by HDL_CinC_Dragon » Logged
HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #12 on: June 04, 2007, 07: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 Smiley

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, 09:10:02 PM by HDL_CinC_Dragon » Logged
ribs
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 24


View Profile
« Reply #13 on: June 16, 2007, 10: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 Wink

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
Logged
rgcustodio
Robot Overlord
****

Helpful? 0
Offline Offline

Posts: 171


Use "Search" and ye might find answers!


View Profile
« Reply #14 on: June 17, 2007, 07: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.
Logged

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

understanding is the path to enlightenment
ribs
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 24


View Profile
« Reply #15 on: June 17, 2007, 01: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
Logged
newbie
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 36


View Profile
« Reply #16 on: July 26, 2007, 07: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.   Cry Cry Cry urgent!!!!! it show isp mode error, it ask me to check power target...
« Last Edit: July 27, 2007, 02:13:07 AM by newbie » Logged
JonHylands
Expert Roboticist
Supreme Robot
*****

Helpful? 2
Offline Offline

Posts: 561


Robot Builder/ Software Developer


View Profile WWW
« Reply #17 on: July 27, 2007, 03:20:34 AM »

Make sure you are powering your board when you try and program it.

- Jon
Logged
newbie
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 36


View Profile
« Reply #18 on: July 27, 2007, 03:43:52 AM »

yes i power my board... help
Logged
JonHylands
Expert Roboticist
Supreme Robot
*****

Helpful? 2
Offline Offline

Posts: 561


Robot Builder/ Software Developer


View Profile WWW
« Reply #19 on: July 27, 2007, 09: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
Logged
oliverj4455
Beginner
*

Helpful? 0
Offline Offline

Posts: 6


View Profile
« Reply #20 on: April 19, 2008, 06: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 Cheesy
Logged
Admin
Administrator
Supreme Robot
*****

Helpful? 62
Offline Offline

Posts: 8,613



View Profile WWW
« Reply #21 on: April 26, 2008, 05: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)
Logged

malex
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 12


View Profile
« Reply #22 on: May 31, 2008, 07: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?
Logged
Admin
Administrator
Supreme Robot
*****

Helpful? 62
Offline Offline

Posts: 8,613



View Profile WWW
« Reply #23 on: June 07, 2008, 03:46:10 PM »

lol yea Jon's is wrong . . . in fact, it contracts his included text Tongue

Quote
with pin 1 being on the bottom left.

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

malex
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 12


View Profile
« Reply #24 on: June 10, 2008, 08: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.
Logged
kirit
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 25


View Profile
« Reply #25 on: November 30, 2008, 06: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, 06:58:27 AM by kirit » Logged
airman00
Contest Winner
Supreme Robot
****

Helpful? 17
Offline Offline

Posts: 3,608


narobo.com


View Profile WWW
« Reply #26 on: November 30, 2008, 07: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)

Logged

Check out the Roboduino, Arduino-compatible board!


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

www.Narobo.com
HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #27 on: November 30, 2008, 08:40:31 AM »

Airman he wasnt talking about the jack that it plugs into Tongue
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 Tongue

Hope this helped!
Logged
kirit
Jr. Member
**

Helpful? 0
Offline Offline

Posts: 25


View Profile
« Reply #28 on: November 30, 2008, 12:01:51 PM »

Airman he wasnt talking about the jack that it plugs into Tongue
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 Tongue

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
Logged
HDL_CinC_Dragon
Supreme Robot
*****

Helpful? 5
Offline Offline

Posts: 1,252



View Profile
« Reply #29 on: November 30, 2008, 04:18:10 PM »

When you look at both ends of the ribbon cable, is the hump on the outside on both ends?
Logged
Pages: [1] 2 3 Print 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Question about the STK and ISP2
Electronics
HDL_CinC_Dragon 3 1529 Last post May 19, 2007, 09:23:11 PM
by Admin
50$ Robot> Skipping the AVR ISP2 Programmer?
Electronics
razvanc_roro 7 2682 Last post May 28, 2007, 12:52:56 PM
by Ro-Bot-X
Alternative for AVR STK Serial Port and avr isp2 programmer
Misc
neko-xii 1 1994 Last post January 18, 2009, 07:29:37 PM
by Miles
Programmer head of sparkfun programmer
Misc
dellagd 16 1438 Last post March 09, 2009, 05:33:02 PM
by dellagd
Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!


Advertise on this Forum