ATTIny85-20SU Buspirate flashing fail

Hacking multi-tool. Get one for $30, including worldwide shipping.

ATTIny85-20SU Buspirate flashing fail

Postby onidaito » Wed Nov 09, 2016 6:10 am

Hello all!
I'm having problems flashing my ATTiny85 chip and I wondered if anyone could help me please?

Annoyingly the anti-spam rules on this forum are making it tricky to post what I need to post. Never-the-less I shall persevere.

My buspirate is reporting a bad signature. I'm using Arch Linux with a BusPirate v3. I have the same circuit arranged in a breadboard with the through-hole version of the ATTiny85 and this works like a charm. My conclusion is there is something different about the 20SU version as it comes out of the factory.

What I'm seeing here is the signature is changing each time :/ This suggests some kind of clock issue right? Do I need to do something to my CLK line from the buspirate at all? I'm surprised because the through-hole version seems fine.

Code: Select all
sudo avrdude -c buspirate -p t85 -P /dev/ttyUSB0 -U flash:w:invite.rom -Ulfuse:w:0x62:m -Uhfuse:w:0xdf:m -U efuse:w:0xff:m -F -v

avrdude: Version 6.3, compiled on Feb 21 2016 at 13:33:25
         Copyright (c) 2000-2005 Brian Dean
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/root/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : buspirate
         AVR Part                      : ATtiny85
         Chip Erase delay              : 4500 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     6     4    0 no        512    4      0  4000  4500 0xff 0xff
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00

         Programmer Type : BusPirate
         Description     : The Bus Pirate

Attempting to initiate BusPirate binary mode...
BusPirate binmode version: 1
BusPirate SPI version: 1
avrdude: Paged flash write enabled.
AVR Extended Commands not found.
avrdude: initialization failed, rc=-2
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x480bf3
avrdude: Expected signature for ATtiny85 is 1E 93 0B
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
BusPirate is back in the text mode

avrdude done.  Thank you.

My design does not have an external clock - its very simple and I believe that ATTiny85-20SU are set to use a 1MHz internal oscillator by default, which is what I'd like. Can anyone see where I've gone wrong? Do I need to wire in some kind of crystal just for the first flashing?


Posts: 2
Joined: Wed Nov 09, 2016 6:05 am

Re: ATTIny85-20SU Buspirate flashing fail

Postby onidaito » Sat Nov 12, 2016 6:18 pm

Hello all. Figured I'd let you know how this ended.

So I tried the decoupling capacitor thing. It makes no difference at all and in all likelihood, isn't needed for such a simple circuit - small fluctuations here and there probably wont matter. The ATTiny seems very forgiving.

Using header pins made a very big different. Soldering them in works a charm. I suspect pogo pins will be something to buy in the near future.

Anyways, despite the flashing I still wasn't getting anywhere. I decided to try a simple blink program and that worked, so clearly the chip was fine.

After scratching my head I replaced the screen with one I took from a sparkfun breakout board. With a little contrast adjustment it worked. My heart sank because I spent a lot on 50 screens from China...

However, on closer inspection, the weird foam connector on the screen looked different between the two screens. It actually comes away in the ones I bought and if flipped over, the screen works like a charm! Not something I expected!
Posts: 2
Joined: Wed Nov 09, 2016 6:05 am

Return to Bus Pirate Support