How to trick AVR Studio /Pocket AVR to work with ATtiny84?

Discussions on the software and hardware for Atmel's STK standard.

Moderator: phalanx

Post Reply
MarkS
Posts: 133
Joined: Sat Sep 29, 2007 7:58 pm

How to trick AVR Studio /Pocket AVR to work with ATtiny84?

Post by MarkS » Sun Jan 11, 2015 4:19 pm

I am trying to program my ATtiny84 using the Pocket AVR and AVR Studio 6.2. The problem is that the tiny84 cannot be programmed with the STK500 and, of course, the Pocket AVR driver is telling AVR Studio that it is a STK500 programmer. :doh: How do I trick AVR Studio into thinking it is connected to a STK600 programmer? I've tried hacking the .xml tool files to make it think that the chip is designed for the STK500, but it would seem that this is hardcoded or encrypted. Nothing I have done so far has an effect.

The issue is that AVR Studio has programmers assigned to the various AVR chips and it will not allow a non-assigned programmer to be used. The ATttiny84 can be programmed with the STK600, but not the STK500.

This really sucks since I'm programming the chip via SPI and not using a STK500 programmer. There has got to be a way.

User avatar
Ross Robotics
Support Volunteer
Posts: 2007
Joined: Thu Jun 07, 2012 9:33 pm
Contact:

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by Ross Robotics » Sun Jan 11, 2015 4:43 pm

Why SPI?
------------------------------------------------------------------------------------------------------------------------------------------------------------
//codlink
Available for circuit and PCB design, just PM me!

MarkS
Posts: 133
Joined: Sat Sep 29, 2007 7:58 pm

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by MarkS » Sun Jan 11, 2015 4:45 pm

The Pocket AVR connects to the AVR via SPI.

jremington
Support Volunteer
Posts: 2173
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by jremington » Sun Jan 11, 2015 5:48 pm

If avrdude will work with the Pocket AVR, just use it to upload the hex file produced by Atmel Studio.

MarkS
Posts: 133
Joined: Sat Sep 29, 2007 7:58 pm

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by MarkS » Sun Jan 11, 2015 6:54 pm

I didn't know that was possible. I'll try that when I get home.

jremington
Support Volunteer
Posts: 2173
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by jremington » Sun Jan 11, 2015 8:11 pm

According to the Sparkfun product page, avrdude works well with it.
https://learn.sparkfun.com/tutorials/po ... ng-avrdude

MarkS
Posts: 133
Joined: Sat Sep 29, 2007 7:58 pm

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by MarkS » Mon Jan 12, 2015 1:24 am

jremington wrote:According to the Sparkfun product page, avrdude works well with it.
https://learn.sparkfun.com/tutorials/po ... ng-avrdude
What SparkFun and AVRDude says are completely different. AVRDude stops with an error stating that stk500 is incompatible with the device. AVR Studio wont even let me get that far.

I've tried most of the programmers listed by AVR Dude and none of them work with the Pocket AVR and the ATtiny84. Most of them get stuck in endless loops saying that it timed out.

User avatar
Ross Robotics
Support Volunteer
Posts: 2007
Joined: Thu Jun 07, 2012 9:33 pm
Contact:

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by Ross Robotics » Mon Jan 12, 2015 6:50 am

Post a schematic of how everything is hooked up.
------------------------------------------------------------------------------------------------------------------------------------------------------------
//codlink
Available for circuit and PCB design, just PM me!

jremington
Support Volunteer
Posts: 2173
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by jremington » Mon Jan 12, 2015 10:07 am

AVRDude stops with an error stating that stk500 is incompatible with the device.
Did you bother to read the Sparkfun tutorial I linked? If avrdude tells you that the stk500 is incompatible with the device, then it thinks you are using the stk500 programmer. The command line MUST inform avrdude that you are using a programmer called "usbtiny". It must also identify the target mcu.

Try this command to get the device signature: avrdude -c usbtiny -p t84

MarkS
Posts: 133
Joined: Sat Sep 29, 2007 7:58 pm

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by MarkS » Mon Jan 12, 2015 12:41 pm

Yes, that is the command I used. When I specify "usbtiny", it gives me an error. The usbtiny driver seems to be emulating the stk500 and reports to AVR Dude that it is a stk500.

jremington
Support Volunteer
Posts: 2173
Joined: Fri Jun 15, 2007 9:41 pm
Location: Eugene, Or

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by jremington » Mon Jan 12, 2015 1:51 pm

That is indeed a problem. If you bought the programmer from Sparkfun, then you should take this up with SF Technical Support.

MarkS
Posts: 133
Joined: Sat Sep 29, 2007 7:58 pm

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by MarkS » Mon Jan 12, 2015 6:26 pm

According to the usbtiny documentation, it is a stk500 device. The driver software is a stk500 emulator, per the documentation.

uChip
Posts: 261
Joined: Sat Jan 19, 2013 11:30 am

Re: How to trick AVR Studio /Pocket AVR to work with ATtiny8

Post by uChip » Mon Jan 12, 2015 7:05 pm

I use the Pocket AVR to program the ATtiny85 from Arduino. That's not exactly what you are doing but Arduino just calls avrdude to do the programming and I think the '84 programs the same as the '85.

Minus the full path expansion, the command that Arduino executes is

avrdude -CC:\.../avrdude.conf -v -v -v -v -pattiny85 -cusbtiny -Uflash:w:C:\...\myfile.cpp.hex:i

I first set this up in Arduino following the instructions in the Tiny AVR Programmer Hookup Guide, but I used the Pocket AVR programmer because it's easier to connect to the ATtiny in a SOIC package on the board. For me it all just works.

You might try the hookup guide to see if that has a different driver or something.

Good luck,
- Chip

Post Reply