Arduino translated to AVR?

You will have better luck with this core...
http://code.google.com/p/arduino-tiny/

The 45_85 core has a few bugs and is missing some features.

Assuming you are using Windows, after expanding either core, your directory structure should be similar this where your sketches are stored in [u]C:\Projects\Arduino\Sketch[/u]

C:\Projects\Arduino\Sketch\hardware\tiny\boards.txt
C:\Projects\Arduino\Sketch\hardware\tiny\cores
C:\Projects\Arduino\Sketch\hardware\tiny\cores\empty
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny
C:\Projects\Arduino\Sketch\hardware\tiny\cores\empty\Arduino.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\empty\main.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\empty\WProgram.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\Arduino.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\binary.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\core_adc.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\core_build_options.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\core_macros.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\core_pins.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\core_timers.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\HardwareSerial.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\HardwareSerial.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\main.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\pins_arduino.c
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\pins_arduino.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\Print.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\Print.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\PwmTimer.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\Stream.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\TinyDebugSerial.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\TinyDebugSerial.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\TinyDebugSerial115200.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\TinyDebugSerial38400.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\TinyDebugSerial9600.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\TinyDebugSerialErrors.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\Tone.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\ToneTimer.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\UserTimer.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\WCharacter.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\WConstants.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\WInterrupts.c
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\wiring.c
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\wiring.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\wiring_analog.c
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\wiring_digital.c
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\wiring_private.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\wiring_pulse.c
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\wiring_shift.c
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\WMath.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\WProgram.h
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\WString.cpp
C:\Projects\Arduino\Sketch\hardware\tiny\cores\tiny\WString.h

If you have the patience there is monstrous topic here about the Tiny Core and programming ATtiny processors the Arduino Way...
http://arduino.cc/forum/index.php/topic,51984.0.html

The download is for Arudino 1.0
I am using version 0022.

I am on a Mac btw...should've mentioned that earlier

I went ahead and added the files I downloaded for the 1.0, and it worked! The Attiny IC's are listed under the board options.
I uploaded the sketch for using the Arduino as an ISP,
I then opened the Blink sketch and changed the pinout to pin 0 insead of pin 13,
inserted a capacitor between reset and GND, and tried to upload it with all of the attiny85v options available,
and none of them worked.

they all stated:
avrdude: stk500_recv(): programmer is not responding

any ideas?

What size capacitor?

Drc3p0:

[quote author=Coding Badly link=topic=108797.msg817188#msg817188 date=1338960878]

You will have better luck with this core...
Google Code Archive - Long-term storage for Google Code Project Hosting.

The 45_85 core has a few bugs and is missing some features.

The download is for Arudino 1.0
I am using version 0022.

I am on a Mac btw...should've mentioned that earlier
[/quote]

+1 on Google Code Archive - Long-term storage for Google Code Project Hosting.

You will find better help and support for it. Consider upgrading Arduino, 0022 is getting fairly dated.

Best Regards,
George

I've been holding off, since I originally had issues with UNO and 1.0

Is there a clear solution for any issues that may arise with this upgrade and UNO? If so, then i am more than happy to download it. I just didn't want to spend a lot of time trying to solve any issues that may arise, as I ended up doing the first time I tried it.

I was using a 47uF capacitor. I know that it states 10, but I haven't had any issues with the capacitor size being too large. I've successfully bootloaded/uploaded sketches to ATMEGA328 IC's. Its just the new breed of attiny's that i'm having issues with.

Drc3p0:
Is there a clear solution for any issues that may arise with this upgrade and UNO?

I have both versions installed (0022 and 1.0.1). I have only encountered one annoyance: Arduino 1.0x changes the filename extension when a sketch is saved. That behaviour can be disabled under File / Preferences.

Serial changed considerably. If you rely on Serial being "blocking" stick with 0022.

Drc3p0:
I was using a 47uF capacitor. I know that it states 10, but I haven't had any issues with the capacitor size being too large.

Yeah that should be fine. I use the same size.

Connect an LED + current limiting resistor to pin 9. When uploading: at all times the LED on pin 9 should display a "heartbeat" and the LED on pin 13 should never light. Is that what happens?

Please post the verbose output from an upload attempt.

Well great, now when I tried to verify the ArduinoISP sketch to my Uno, i recieve several error messages. The proper board and serial port were chosen. This is all happeneing after I added those attiny core files into the 'hardware' folder, as instructed before. I may have placed them in the wrong folder or something, but I now recieve these error messages:

I'm going to go ahead and switch to 1.0 before continuing....

ArduinoISP.cpp: In function 'void setup()':
ArduinoISP:48: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void loop()':
ArduinoISP:105: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'uint8_t getch()':
ArduinoISP:111: error: 'Serial' was not declared in this scope
ArduinoISP:112: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void readbytes(int)':
ArduinoISP:116: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void empty_reply()':
ArduinoISP:163: error: 'Serial' was not declared in this scope
ArduinoISP:167: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void breply(uint8_t)':
ArduinoISP:173: error: 'Serial' was not declared in this scope
ArduinoISP:178: error: 'Serial' was not declared in this scope
ArduinoISP.cpp: In function 'void start_pmode()':
ArduinoISP:232: error: 'SS' was not declared in this scope
ArduinoISP:234: error: 'SCK' was not declared in this scope
ArduinoISP:239: error: 'MISO' was not declared in this scope
ArduinoISP:240: error: 'MOSI' was not declared in this scope
ArduinoISP.cpp: In function 'void end_pmode()':
ArduinoISP:246: error: 'MISO' was not declared in this scope

AND THE LIST GOES ON....

I have upgraded a step to Arduino 1.0
I downloaded the atiny zip and placed it in the 'hardware' folder within the sketchbook. from Google Code Archive - Long-term storage for Google Code Project Hosting.
The instructions state that there should be an option for 'Atiny85v (with Arduino as ISP)'
That option is not available, and I couldn't get any of the 85v options to upload successfully. Here are the options that I have available:

Why is it that I don't have the same board options that the instructions indicate?

Why is it that I don't have the same board options that the instructions indicate?

The names used in the Tiny Core are just a bit different and a bit more descriptive than the names used in the HLT core. The Tiny Core is correctly installed.

At this point you should be able to select any of the ATtiny85 entries, perform a Tools / Burn Bootloader in the IDE, and have a processor configured and ready to use. I suggest starting with the 8 MHz entry: ATtiny85 @ 8 MHz (internal oscillator; BOD disabled).

That option is not available, and I couldn't get any of the 85v options to upload successfully.

Error message?

I tried to burn the bootloader, with these options:

Board > attiny85v @ 8 MHz (internal oscillator, BOD disabled)
Programmer > Arduino as ISP
selected 'Burn Bootloader'

recieved this as the error message:

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x01
avrdude: stk500_initialize(): (a) protocol error, expect=0x14, resp=0x10
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500_disable(): unknown response=0x12

When you perform the Burn Bootloader, does the LED on pin 13 ever blink? Does the LED on pin always display a heartbeat?

The LED on pin 13 blinks while uploading the ArduinoISP sketch, but only while its uploading. I am not able to burn the bootloader due to the error messages that are displayed above.

Drc3p0:
The LED on pin 13 blinks while uploading the ArduinoISP sketch, but only while its uploading.

Perfect.

I am not able to burn the bootloader due to the error messages that are displayed above.

Please post the verbose output from an attempt to Burn Bootloader...

• Start the Arduino IDE
• Click File / Preferences
• Ensure Show verbose output during upload is checked
• Click OK
• Click Tools / Burn Bootloader
• Copy-and-paste the text from the status window into a reply

Hopefully something in there will shed some light on the problem.

Thank you for your patience, I really appreciate it. Here's the verbose output from the attempt to burn the bootloader to the Attiny85 @ 8 MHz (internal oscillator with BOD disabled) and the Arduino as ISP.

/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pattiny85 -cstk500v1 -P/dev/tty.usbmodemfa141 -b19200 -e -Uefuse:w:0xFF:m -Uhfuse:w:0xD7:m -Ulfuse:w:0xE2:m 

avrdude: Version 5.11, compiled on Sep  2 2011 at 18:52:52
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/Users/Darcyneal/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/tty.usbmodemfa141
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Send: 0 [30]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
         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
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           flash         65     6    32    0 yes      8192   64    128  4500  4500 0xff 0xff
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00

         Programmer Type : STK500
         Description     : Atmel STK500 Version 1.x firmware
avrdude: Send: A [41] . [80]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [10] 
avrdude: Recv: . [14] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14
avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: . [02] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: . [10] 

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
avrdude: Send: A [41] . [98]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [01] 
avrdude: Recv: . [10] 
         Hardware Version: -1863096046
         Firmware Version: -1073746664.-1609565488
         Topcard         : STK502
avrdude: Send: A [41] . [84]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [12] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [85]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [86]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [87]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [89]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
         Vtarget         : 1.8 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: Send: A [41] . [81]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: A [41] . [82]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [00] 
avrdude: Recv: . [10] 
avrdude: Send: B [42] . [14] . [00] . [00] . [01] . [01] . [01] . [01] . [03] . [ff] . [ff] . [ff] . [ff] . [00] @ [40] . [02] . [00] . [00] . [00]   [20] . [00]   [20] 
avrdude: Recv: . [14] 
avrdude: Recv: . [01] 
avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: Send: Q [51]   [20] 
avrdude: Recv: . [10] 
avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done.  Thank you.

Moderator edit: changed to code tags.

That and some of the core code changes along with some compiler option flag changes creates larger code with 1.x vs pre 1.x.
So if you are pushing the edge of the capacity of the flash, your image not fit when you upgrade to 1.x

Plus there are still quite a few libraries that have not been converted over to 1.x.
Arduino 1.0 broke 100% of the existing 3rd party libraries. While the changes to fix them are often quite minimal
it is just something to be aware of. So if you have some exiting libraries you may run into compile issues
unless they are very recent libraries.

--- bill

bperrybap:
That and some of the core code changes along with some compiler option flag changes creates larger code with 1.x vs pre 1.x.
So if you are pushing the edge of the capacity of the flash, your image not fit when you upgrade to 1.x

For this topic, she's using the Tiny Core not the Standard Core. Image sizes are the same (same compiler; core hasn't changed for years).

The problem is a synchronization bug in ArduinoISP. I'm in the process of tracking down the solution.