Programming ATTINY 2313 through Arduino YUN

hello everyone, for the past week or so i have been unable to program the ATTINY 2313 through my arduino YUN. When i attempt to upload a program to the IC, the Arduino IDE says the board is not in sync 0x03. Here is what i have been trying to use as a guideline for my venture.

http://dev.mikamai.com/post/78652180658/how-to-program-an-attiny85-or-attiny45-with-an

I have tried modifying the ISP program accordingly, and used the circuit provided with no positive result.

http://playground.arduino.cc/Main/ArduinoOnOtherAtmelChips is where i found the library for the 2313, and i have tried using both links for the 2313 with no success. It is also worth mentioning i have verified the breadboard i am using is fully functional.

Any assistance with this problem would be very much appreciated.

I believe the issue you are encountering is described here: ArduinoISP on the Leonardo does not work on windows · Issue #1182 · arduino/Arduino · GitHub. PeterVH has explained a fix for this issue on his blog: ArduinoISP on the Leonardo | PeterVH however, that needs some small modifications to work on recent versions of the Arduino IDE. I put together an easy to install updated version here: GitHub - per1234/ATmega32U4asISP: Allows ATmega32U4 based boards to be used as Arduino as ISP on Windows. All installation and usage instructions are at that link. Please let me know how it works for you.

Hello, i have followed your directions. I now get an invalid device signature error from AVRDude, is this expected. If not, what can i do to remedy the problem?

Please do this:

  • File > Preferences > Show verbose output during: > upload(check)
  • Tools > Burn Bootloader
  • After the process fails you will see a button on the right side of the orange bar “Copy error message”. Click that button.
  • Paste the error in a message here on the forum using code tags(</> button on the toolbar).

Arduino: 1.6.5 (Windows 8.1), Board: "ATtiny x313 series, ATtiny2313, 8 MHz (internal), B.O.D. Disabled, no"

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Users\comma\AppData\Roaming\Arduino15\packages\ATTinyCore\hardware\avr\1.1.1/avrdude.conf -v -pattiny2313 -carduino -PCOM5 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFF:m -Uhfuse:w:0x9F:m -Ulfuse:w:0xE4:m

avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58

Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

Copyright (c) 2007-2009 Joerg Wunsch

System wide configuration file is "C:\Users\comma\AppData\Roaming\Arduino15\packages\ATTinyCore\hardware\avr\1.1.1/avrdude.conf"

Using Port : COM5

Using Programmer : arduino

Overriding Baud Rate : 19200

Setting bit clk period : 5.0

AVR Part : ATtiny2313

Chip Erase delay : 15000 us

PAGEL : PD4

BS2 : PD6

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 256 4 0 4000 4500 0xff 0xff

flash 65 6 64 0 yes 2048 32 64 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 2 0 0 0 0 0x00 0x00

Programmer Type : Arduino

Description : Arduino

Hardware Version: 2

Firmware Version: 1.18

Topcard : Unknown

Vtarget : 0.0 V

Varef : 0.0 V

Oscillator : Off

SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0xffffff (retrying)

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0xffffff (retrying)

Error while burning bootloader.

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0xffffff

avrdude: Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check.

avrdude done. Thank you.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

// is this good?

commander_darmok:
avrdude: Device signature = 0xffffff

avrdude: Yikes! Invalid device signature.

Please recheck all your wiring. That error indicates the programmer may not be correctly connected to the ATtiny2313.

commander_darmok:
// is this good?

You forgot the code tags that I requested you to use. Please always use code tags when you post code or error/warning messages or other console ouput to the forum. This will make sure it is properly formatted and easy to read and copy to the IDE or text editor. This is one of the forum rules, please follow them.

I appreciate the assistance with my issues, i believe i have now correctly connected the Yun to the 2313. I was plugging in my icsp to jumper connector upside down.

I have a white paint marker I use to mark pin 1 of all my programmer cables and ICSP headers because I use them so much and don't want to even have to think about which is the right orientation. I still manage to get it backwards or offset by a row of pins from time to time.

Is it working correctly now?

Interestingly enough, it is functional. But in a slightly undesired way. When i upload a program to it that just pulls a pin high as output to test functionality, it outputs to the next pin. For example when pin 7 is selected as output, pin 8 goes high. Am i misinterpreting the 2313's pinout or is there something funny with what i am doing?. It is worth noting that i have tried this on several 2313's i have and they all have the same result. I don't really mind this interesting issue, but it would be helpful to know how i would go about fixing this.

From the board name on the output you posted it looks like you're using ATTinyCore. If so, the Arduino pin mapping should follow the diagram shown at GitHub - SpenceKonde/ATTinyCore: Arduino core for ATtiny 1634, 828, x313, x4, x41, x5, x61, x7 and x8(Arduino pins are in the blue ovals):


Are you getting different results?