Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Support => AVRDude => Topic started by: adamoutler on January 08, 2012, 08:17:15 pm

Title: Programming an ATTiny2313a
Post by: adamoutler on January 08, 2012, 08:17:15 pm
I can't get the Bus Pirate to program my ATTiny2313a.  I don't know much about this, so I'm providing my log and source.  All I want to do is make my ATTiny2313a run a "Blinking LED" program until I can figure out how to do this better. 

I prepared a source package here: http://www.mediafire.com/file/0e77xr5u8 ... Pirate.zip (http://www.mediafire.com/file/0e77xr5u8bmurrs/BusPirate.zip)  .  It contains everything I've been trying.. make file set up for bus pirate,  Arduino Mega ISP, AVRDude SVN, blinking_led C code, blinking LED arduino code, and make files.  If you uncompress this on Linux, you should just have to run "make install" and it will attempt to use the Bus Pirate as a programmer.

 I don't know if it helps, but here is my log: http://pastebin.com/a2xAq9rZ (http://pastebin.com/a2xAq9rZ)  It seems to detect the chip, but it won't program.  When it attempts to program, it does this:
Code: [Select]
Detecting BusPirate...
avrdude: buspirate_send_bin():
        0x23 0x0a
avrdude: Send: # [23] . [0a]
avrdude: Recv: . [ff]
avrdude: buspirate_readline():
BusPirate is not responding. Attempting reset.
avrdude: buspirate_send_bin():
        0x00
avrdude: Send: . [00]
avrdude: buspirate_send_bin():
        0x0f
avrdude: Send: . [0f]
avrdude: ser_recv(): programmer is not responding
BusPirate is back in the text mode


I have tried 3 separate ATTiny2313's and I feel like I've tried everything and nothing is working.
Title: Re: Programming an ATTiny2313a
Post by: robots on January 08, 2012, 08:44:47 pm
you are executing:
avrdude -P /dev/ttyUSB0 -c buspirate -p attiny2313 -v -F

when testing the ID code of the chip....., but you are executing:
avrdude -c buspirate -p attiny2313 -P /dev/ttyUSB0 -e -b 19200 -U flash:w:blinking_led_2313.hex -vvvvv -F

Can you try to run the command without the "-b" parameter? In fact command such as this should be enough:
avrdude -c buspirate -p attiny2313 -P /dev/ttyUSB0 -U flash:w:blinking_led_2313.hex
Title: Re: Programming an ATTiny2313a
Post by: ian on January 09, 2012, 12:00:12 pm
Please upgrade to the final v6 firmware too, that might help:

http://dangerousprototypes.com/docs/Bus_Pirate#Download (http://dangerousprototypes.com/docs/Bus_Pirate#Download)

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01002059376session_write_close ( )...(null):0
20.01032190968ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01032191744Database_MySQL->query( ).../DatabaseHandler.php:119
40.05602330480Database_MySQL->error( ).../Db-mysql.class.php:273