Page 1 of 1

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

Posted: Sun Jan 11, 2015 4:19 pm
by MarkS
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.

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

Posted: Sun Jan 11, 2015 4:43 pm
by Ross Robotics
Why SPI?

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

Posted: Sun Jan 11, 2015 4:45 pm
by MarkS
The Pocket AVR connects to the AVR via SPI.

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

Posted: Sun Jan 11, 2015 5:48 pm
by jremington
If avrdude will work with the Pocket AVR, just use it to upload the hex file produced by Atmel Studio.

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

Posted: Sun Jan 11, 2015 6:54 pm
by MarkS
I didn't know that was possible. I'll try that when I get home.

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

Posted: Sun Jan 11, 2015 8:11 pm
by jremington
According to the Sparkfun product page, avrdude works well with it.
https://learn.sparkfun.com/tutorials/po ... ng-avrdude

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

Posted: Mon Jan 12, 2015 1:24 am
by MarkS
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.

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

Posted: Mon Jan 12, 2015 6:50 am
by Ross Robotics
Post a schematic of how everything is hooked up.

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

Posted: Mon Jan 12, 2015 10:07 am
by jremington
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

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

Posted: Mon Jan 12, 2015 12:41 pm
by MarkS
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.

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

Posted: Mon Jan 12, 2015 1:51 pm
by jremington
That is indeed a problem. If you bought the programmer from Sparkfun, then you should take this up with SF Technical Support.

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

Posted: Mon Jan 12, 2015 6:26 pm
by MarkS
According to the usbtiny documentation, it is a stk500 device. The driver software is a stk500 emulator, per the documentation.

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

Posted: Mon Jan 12, 2015 7:05 pm
by uChip
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