What is an ACEDUINO? It is the Philippine Arduino clone. See pic 2 and 3.

Quote from Fall Electronics:

If you have already tried you have found out you can't use the ATTiny chips in Arduino. This is because it doesn't have the cores for the chips. A core in this context is a bunch of code and text that tells Arduino which pins are which, how fast the clock can go, how to upload the program, which functions the chip knows... basically it's an in-depth profile of the chip. 

I have tried almost every way to program an ATtiny2313 with an Arduino that i could find. For what ever reason none of them ever worked.  If you have had such a problem and want to remedy it or are just the curious type then read on.

Step 1: Not Working

Coding isn't old hat for me so all of these seamed rather complicated.
Here is some of the more common ones i had tried that i couldn't get to work: Ladyada, ToasterBotics, Hilow. I imagine these are working for a lot of people but how, i dunno.

In the picture that shows my IDE you can see the list of boards i have to choose from. There is one choice for the ATtiny2313  with no clock options.
When ever i select this option and try to compile say the blink sketch, it will always through an error. Any sketch, any time, any where.

This was one the procedure that i used here. If you can get this to work you are a better man than I.  
<p>I had a problem with my ATtiny2313 chip where I was getting a 'device signature 0x00000000' error while trying to upload a hex file or a sketch via my arduino. I thought I would post the solution to my issue here incase someone else has a similar problem.</p><p>The problem with my chip was that the 1MhZ 'fuse' was turned off when I got it from eBay (supposedly new) and the solution was to connect everything up as above and load the ISP bit then jump a wire from ~3 on the Arduino to the PA0 pin on the 2313 chip and then run the following sketch with the cap and resistor connected as described. This turned on the 1MhZ bit of the chip and allowed AVRDude and the Arduino software to talk to the chip.</p><p>I didn't write the code and it came from here. <a href="http://www.avrfreaks.net/comment/885850#comment-885850" rel="nofollow">http://www.avrfreaks.net/comment/885850#comment-88...</a></p><p>// ArduinoISP version 04m3<br>// Copyright (c) 2008-2011 Randall Bohn<br>// If you require a license, see <br>// <a href="http://www.opensource.org/licenses/bsd-license.php" rel="nofollow"> http://www.opensource.org/licenses/bsd-license.ph...</a><br>//<br>// This sketch turns the Arduino into a AVRISP<br>// using the following arduino pins:<br>//<br>// pin name: not-mega: mega(1280 and 2560)<br>// slave reset: 10: 53 <br>// MOSI: 11: 51 <br>// MISO: 12: 50 <br>// SCK: 13: 52 <br>//<br>// CLOCK_1MHZ 3: .kbv<br>//<br>// Put an LED (with resistor) on the following pins:<br>// 9: Heartbeat - shows the programmer is running<br>// 8: Error - Lights up if something goes wrong (use red if that makes sense)<br>// 7: Programming - In communication with the slave<br>//<br>// 23 July 2011 Randall Bohn<br>// -Address Arduino issue 509 :: Portability of ArduinoISP<br>// <a href="http://code.google.com/p/arduino/issues/detail?id=509" rel="nofollow"> http://www.opensource.org/licenses/bsd-license.ph...</a><br>//<br>// October 2010 by Randall Bohn<br>// - Write to EEPROM &gt; 256 bytes<br>// - Better use of LEDs:<br>// -- Flash LED_PMODE on each flash commit<br>// -- Flash LED_PMODE while writing EEPROM (both give visual feedback of writing progress)<br>// - Light LED_ERR whenever we hit a STK_NOSYNC. Turn it off when back in sync.<br>// - Use pins_arduino.h (should also work on Arduino Mega)<br>//<br>// October 2009 by David A. Mellis<br>// - Added support for the read signature command<br>// <br>// February 2009 by Randall Bohn<br>// - Added support for writing to EEPROM (what took so long?)<br>// Windows users should consider WinAVR's avrdude instead of the<br>// avrdude included with Arduino software.<br>//<br>// January 2008 by Randall Bohn<br>// - Thanks to Amplificar for helping me with the STK500 protocol<br>// - The AVRISP/STK500 (mk I) protocol is used in the arduino bootloader<br>// - The SPI functions herein were developed for the AVR910_ARD programmer <br>// - More information at <a href="http://code.google.com/p/mega-isp" rel="nofollow"> http://www.opensource.org/licenses/bsd-license.ph...</a><br><br>#include &quot;pins_arduino.h&quot;<br>#define RESET SS<br><br>#define LED_HB 9<br>#define LED_ERR 8<br>#define LED_PMODE 7<br>#define PROG_FLICKER true<br><br>#define HWVER 2<br>#define SWMAJ 1<br>#define SWMIN 18<br><br>// STK Definitions<br>#define STK_OK 0x10<br>#define STK_FAILED 0x11<br>#define STK_UNKNOWN 0x12<br>#define STK_INSYNC 0x14<br>#define STK_NOSYNC 0x15<br>#define CRC_EOP 0x20 //ok it is a space...<br><br>void pulse(int pin, int times);<br><br>void setup() {<br> Serial.begin(19200);<br> pinMode(LED_PMODE, OUTPUT);<br> pulse(LED_PMODE, 2);<br> pinMode(LED_ERR, OUTPUT);<br> pulse(LED_ERR, 2);<br> pinMode(LED_HB, OUTPUT);<br> pulse(LED_HB, 2);<br>// .kbv these next statements provide a 1MHz clock signal<br> DDRD |= (1&lt;&lt;3); // make o/p<br> OCR2A = F_CPU/2/1000000 - 1; // CTC toggle @ 1MHz<br> OCR2B = OCR2A; // match B <br> TCCR2A = (1&lt; 192) hbdelta = -hbdelta;<br> if (hbval &lt; 32) hbdelta = -hbdelta;<br> hbval += hbdelta;<br> analogWrite(LED_HB, hbval);<br> delay(20);<br>}<br>void loop(void) {<br> // is pmode active?<br> if (pmode) digitalWrite(LED_PMODE, HIGH); <br> else digitalWrite(LED_PMODE, LOW);<br> // is there an error?<br> if (error) digitalWrite(LED_ERR, HIGH); <br> else digitalWrite(LED_ERR, LOW);<br><br> // light the heartbeat LED<br> heartbeat();<br> if (Serial.available()) {<br> avrisp();<br> }<br>}<br><br>uint8_t getch() {<br> while(!Serial.available());<br> return Serial.read();<br>}<br>void fill(int n) {<br> for (int x = 0; x &lt; n; x++) {<br> buff[x] = getch();<br> }<br>}<br><br>#define PTIME 30<br>void pulse(int pin, int times) {<br> do {<br> digitalWrite(pin, HIGH);<br> delay(PTIME);<br> digitalWrite(pin, LOW);<br> delay(PTIME);<br> } <br> while (times--);<br>}<br><br>void prog_lamp(int state) {<br> if (PROG_FLICKER)<br> digitalWrite(LED_PMODE, state);<br>}<br><br>void spi_init() {<br> uint8_t x;<br> SPCR = 0x53;<br> x=SPSR;<br> x=SPDR;<br>}<br><br>void spi_wait() {<br> do {<br> } <br> while (!(SPSR &amp; (1 &lt;&lt; SPIF)));<br>}<br><br>uint8_t spi_send(uint8_t b) {<br> uint8_t reply;<br> SPDR=b;<br> spi_wait();<br> reply = SPDR;<br> return reply;<br>}<br><br>uint8_t spi_transaction(uint8_t a, uint8_t b, uint8_t c, uint8_t d) {<br> uint8_t n;<br> spi_send(a); <br> n=spi_send(b);<br> //if (n != a) error = -1;<br> n=spi_send(c);<br> return spi_send(d);<br>}<br><br>void empty_reply() {<br> if (CRC_EOP == getch()) {<br> Serial.print((char)STK_INSYNC);<br> Serial.print((char)STK_OK);<br> } <br> else {<br> error++;<br> Serial.print((char)STK_NOSYNC);<br> }<br>}<br><br>void breply(uint8_t b) {<br> if (CRC_EOP == getch()) {<br> Serial.print((char)STK_INSYNC);<br> Serial.print((char)b);<br> Serial.print((char)STK_OK);<br> } <br> else {<br> error++;<br> Serial.print((char)STK_NOSYNC);<br> }<br>}<br><br>void get_version(uint8_t c) {<br> switch(c) {<br> case 0x80:<br> breply(HWVER);<br> break;<br> case 0x81:<br> breply(SWMAJ);<br> break;<br> case 0x82:<br> breply(SWMIN);<br> break;<br> case 0x93:<br> breply('S'); // serial programmer<br> break;<br> default:<br> breply(0);<br> }<br>}<br><br>void set_parameters() {<br> // call this after reading paramter packet into buff[]<br> param.devicecode = buff[0];<br> param.revision = buff[1];<br> param.progtype = buff[2];<br> param.parmode = buff[3];<br> param.polling = buff[4];<br> param.selftimed = buff[5];<br> param.lockbytes = buff[6];<br> param.fusebytes = buff[7];<br> param.flashpoll = buff[8]; <br> // ignore buff[9] (= buff[8])<br> // following are 16 bits (big endian)<br> param.eeprompoll = beget16(&amp;buff[10]);<br> param.pagesize = beget16(&amp;buff[12]);<br> param.eepromsize = beget16(&amp;buff[14]);<br><br> // 32 bits flashsize (big endian)<br> param.flashsize = buff[16] * 0x01000000<br> + buff[17] * 0x00010000<br> + buff[18] * 0x00000100<br> + buff[19];<br><br>}<br><br>void start_pmode() {<br> spi_init();<br> // following delays may not work on all targets...<br> pinMode(RESET, OUTPUT);<br> digitalWrite(RESET, HIGH);<br> pinMode(SCK, OUTPUT);<br> digitalWrite(SCK, LOW);<br> delay(50);<br> digitalWrite(RESET, LOW);<br> delay(50);<br> pinMode(MISO, INPUT);<br> pinMode(MOSI, OUTPUT);<br> spi_transaction(0xAC, 0x53, 0x00, 0x00);<br> pmode = 1;<br>}<br><br>void end_pmode() {<br> pinMode(MISO, INPUT);<br> pinMode(MOSI, INPUT);<br> pinMode(SCK, INPUT);<br> pinMode(RESET, INPUT);<br> pmode = 0;<br>}<br><br>void universal() {<br> int w;<br> uint8_t ch;<br><br> fill(4);<br> ch = spi_transaction(buff[0], buff[1], buff[2], buff[3]);<br> breply(ch);<br>}<br><br>void flash(uint8_t hilo, int addr, uint8_t data) {<br> spi_transaction(0x40+8*hilo, <br> addr&gt;&gt;8 &amp; 0xFF, <br> addr &amp; 0xFF,<br> data);<br>}<br>void commit(int addr) {<br> if (PROG_FLICKER) prog_lamp(LOW);<br> spi_transaction(0x4C, (addr &gt;&gt; 8) &amp; 0xFF, addr &amp; 0xFF, 0);<br> if (PROG_FLICKER) {<br> delay(PTIME);<br> prog_lamp(HIGH);<br> }<br>}<br><br>//#define _current_page(x) (here &amp; 0xFFFFE0)<br>int current_page(int addr) {<br> if (param.pagesize == 32) return here &amp; 0xFFFFFFF0;<br> if (param.pagesize == 64) return here &amp; 0xFFFFFFE0;<br> if (param.pagesize == 128) return here &amp; 0xFFFFFFC0;<br> if (param.pagesize == 256) return here &amp; 0xFFFFFF80;<br> return here;<br>}<br>void write_flash(int length) {<br> fill(length);<br> if (CRC_EOP == getch()) {<br> Serial.print((char) STK_INSYNC);<br> Serial.print((char) write_flash_pages(length));<br> } <br> else {<br> error++;<br> Serial.print((char) STK_NOSYNC);<br> }<br>}<br><br>uint8_t write_flash_pages(int length) {<br> int x = 0;<br> int page = current_page(here);<br> while (x &lt; length) {<br> if (page != current_page(here)) {<br> commit(page);<br> page = current_page(here);<br> }<br> flash(LOW, here, buff[x++]);<br> flash(HIGH, here, buff[x++]);<br> here++;<br> }<br><br> commit(page);<br><br> return STK_OK;<br>}<br><br>#define EECHUNK (32)<br>uint8_t write_eeprom(int length) {<br> // here is a word address, get the byte address<br> int start = here * 2;<br> int remaining = length;<br> if (length &gt; param.eepromsize) {<br> error++;<br> return STK_FAILED;<br> }<br> while (remaining &gt; EECHUNK) {<br> write_eeprom_chunk(start, EECHUNK);<br> start += EECHUNK;<br> remaining -= EECHUNK;<br> }<br> write_eeprom_chunk(start, remaining);<br> return STK_OK;<br>}<br>// write (length) bytes, (start) is a byte address<br>uint8_t write_eeprom_chunk(int start, int length) {<br> // this writes byte-by-byte,<br> // page writing may be faster (4 bytes at a time)<br> fill(length);<br> prog_lamp(LOW);<br> for (int x = 0; x &lt; length; x++) {<br> int addr = start+x;<br> spi_transaction(0xC0, (addr&gt;&gt;8) &amp; 0xFF, addr &amp; 0xFF, buff[x]);<br> delay(45);<br> }<br> prog_lamp(HIGH); <br> return STK_OK;<br>}<br><br>void program_page() {<br> char result = (char) STK_FAILED;<br> int length = 256 * getch();<br> length += getch();<br> char memtype = getch();<br> // flash memory @here, (length) bytes<br> if (memtype == 'F') {<br> write_flash(length);<br> return;<br> }<br> if (memtype == 'E') {<br> result = (char)write_eeprom(length);<br> if (CRC_EOP == getch()) {<br> Serial.print((char) STK_INSYNC);<br> Serial.print(result);<br> } <br> else {<br> error++;<br> Serial.print((char) STK_NOSYNC);<br> }<br> return;<br> }<br> Serial.print((char)STK_FAILED);<br> return;<br>}<br><br>uint8_t flash_read(uint8_t hilo, int addr) {<br> return spi_transaction(0x20 + hilo * 8,<br> (addr &gt;&gt; 8) &amp; 0xFF,<br> addr &amp; 0xFF,<br> 0);<br>}<br><br>char flash_read_page(int length) {<br> for (int x = 0; x &lt; length; x+=2) {<br> uint8_t low = flash_read(LOW, here);<br> Serial.print((char) low);<br> uint8_t high = flash_read(HIGH, here);<br> Serial.print((char) high);<br> here++;<br> }<br> return STK_OK;<br>}<br><br>char eeprom_read_page(int length) {<br> // here again we have a word address<br> int start = here * 2;<br> for (int x = 0; x &lt; length; x++) {<br> int addr = start + x;<br> uint8_t ee = spi_transaction(0xA0, (addr &gt;&gt; 8) &amp; 0xFF, addr &amp; 0xFF, 0xFF);<br> Serial.print((char) ee);<br> }<br> return STK_OK;<br>}<br><br>void read_page() {<br> char result = (char)STK_FAILED;<br> int length = 256 * getch();<br> length += getch();<br> char memtype = getch();<br> if (CRC_EOP != getch()) {<br> error++;<br> Serial.print((char) STK_NOSYNC);<br> return;<br> }<br> Serial.print((char) STK_INSYNC);<br> if (memtype == 'F') result = flash_read_page(length);<br> if (memtype == 'E') result = eeprom_read_page(length);<br> Serial.print(result);<br> return;<br>}<br><br>void read_signature() {<br> if (CRC_EOP != getch()) {<br> error++;<br> Serial.print((char) STK_NOSYNC);<br> return;<br> }<br> Serial.print((char) STK_INSYNC);<br> uint8_t high = spi_transaction(0x30, 0x00, 0x00, 0x00);<br> Serial.print((char) high);<br> uint8_t middle = spi_transaction(0x30, 0x00, 0x01, 0x00);<br> Serial.print((char) middle);<br> uint8_t low = spi_transaction(0x30, 0x00, 0x02, 0x00);<br> Serial.print((char) low);<br> Serial.print((char) STK_OK);<br>}<br>//////////////////////////////////////////<br>//////////////////////////////////////////<br>////////////////////////////////////<br>////////////////////////////////////<br>int avrisp() { <br> uint8_t data, low, high;<br> uint8_t ch = getch();<br> switch (ch) {<br> case '0': // signon<br> error = 0;<br> empty_reply();<br> break;<br> case '1':<br> if (getch() == CRC_EOP) {<br> Serial.print((char) STK_INSYNC);<br> Serial.print(&quot;AVR ISP&quot;);<br> Serial.print((char) STK_OK);<br> }<br> break;<br> case 'A':<br> get_version(getch());<br> break;<br> case 'B':<br> fill(20);<br> set_parameters();<br> empty_reply();<br> break;<br> case 'E': // extended parameters - ignore for now<br> fill(5);<br> empty_reply();<br> break;<br><br> case 'P':<br> start_pmode();<br> empty_reply();<br> break;<br> case 'U': // set address (word)<br> here = getch();<br> here += 256 * getch();<br> empty_reply();<br> break;<br><br> case 0x60: //STK_PROG_FLASH<br> low = getch();<br> high = getch();<br> empty_reply();<br> break;<br> case 0x61: //STK_PROG_DATA<br> data = getch();<br> empty_reply();<br> break;<br><br> case 0x64: //STK_PROG_PAGE<br> program_page();<br> break;<br><br> case 0x74: //STK_READ_PAGE 't'<br> read_page(); <br> break;<br><br> case 'V': //0x56<br> universal();<br> break;<br> case 'Q': //0x51<br> error=0;<br> end_pmode();<br> empty_reply();<br> break;<br><br> case 0x75: //STK_READ_SIGN 'u'<br> read_signature();<br> break;<br><br> // expecting a command, not CRC_EOP<br> // this is how we can get back in sync<br> case CRC_EOP:<br> error++;<br> Serial.print((char) STK_NOSYNC);<br> break;<br><br> // anything else we will return STK_UNKNOWN<br> default:<br> error++;<br> if (CRC_EOP == getch()) <br> Serial.print((char)STK_UNKNOWN);<br> else<br> Serial.print((char)STK_NOSYNC);<br> }<br>}</p>
Huh, I thought these couldn't be used in an Arduino-type board because they're missing 8 pins...
What do you mean? Used in Arduino-type boards. <br>Do you think i am plugging a ATtiny2313 into an Arduino board? <br>Because if that's what you are talking about please see step 3.
OK, got confused for a minute. Seems like it's programmed in almost exactly the same way an ATMega328 is, just with slightly different pins.
Yes they are programmed in the same manner. That's the beauty of Arduino.
Thanks WWC! I'll have to give this a try!
Hi thanks for the comment. <br>It would be nice to see if it works for you. <br>Thanks

About This Instructable




Bio: Why would i buy something ready made when i can make it myself with half the features for twice the money? DIY!
More by WWC:3D Pinted Spool Reel Hard Drive Tachometer for a Desktop Computer 4093 Schmidt Trigger / Fan Speed Regulation 
Add instructable to: