Thread Tools
Old Feb 24, 2013, 10:35 PM
davidmc36 is offline
Find More Posts by davidmc36
No bounce, No play.
davidmc36's Avatar
Question

Programming ATTiny wit Arduino


I am trying to do this:

http://www.forkrobotics.com/2012/04/...-on-an-attiny/

If I have an AtTiny that has already been programmed, do I need to re-set the fuses for it to be reprogrammed?
Sign up now
to remove ads between posts
Old Feb 25, 2013, 11:58 AM
dave1993 is offline
Find More Posts by dave1993
RC beginner
probably not. it depends on what clock you want (1mhz or 8mhz) but if it was used before they are probably ok. fuses do not change when the chip is re-flashed. be careful if you do change them because thats about the only way to destroy a chip.

i didnt have much use for arduino before but with the new easy to customize ide and support for tiny, mighty (m1284), and just about any other avr its of much more interest. you do have to realize most standard library routines dont work with tiny but as time goes by they are adding some capability there.
Old Feb 25, 2013, 09:06 PM
davidmc36 is offline
Find More Posts by davidmc36
No bounce, No play.
davidmc36's Avatar
I have just started playing around with Arduino and the tiny chips. I really don't know much about them.

I was able to read the chip and view the hex data. Was looking for a way to program with the "plain language" of Arduino. Tried some of the sample code in the tutorial but got "sync" error.
Old Feb 25, 2013, 09:53 PM
dave1993 is offline
Find More Posts by dave1993
RC beginner
that msg is almost always caused by wiring error or using wrong type of programming. there are 2 types: isp and bootload. by default the ide uses bootload but tiny chips dont have a bootloader inside so isp must be used. you have to tell the ide this by changing the boards.txt file.
Old Feb 25, 2013, 11:03 PM
davidmc36 is offline
Find More Posts by davidmc36
No bounce, No play.
davidmc36's Avatar
I think I will re-check the wiring and try again. I had the Arduino as ISP selected. Does it make any difference if I select 1 or 8 mhz internal or 20 external?
Old Feb 25, 2013, 11:39 PM
dave1993 is offline
Find More Posts by dave1993
RC beginner
if you selected from the ide i think that does not work. that is for putting in a bootloader which tiny cannot do. if you selected by editing board.txt that is correct. mhz is important in order for the compiler to work. if you select external crystal the chip will probably die and youll need to attach a crytal to get it going again.
Old Feb 26, 2013, 04:44 AM
davidmc36 is offline
Find More Posts by davidmc36
No bounce, No play.
davidmc36's Avatar
Thanks for taking time to respond here. Hmmmmmm......

I may just go with Arduino Mini....can do more with that anyway. Not that expensive.
Old Feb 26, 2013, 01:34 PM
dave1993 is offline
Find More Posts by dave1993
RC beginner
yes, mini or even bare mega8, mega168, or mega328 is better to get started. all you need is crystal and pins:



and a usbasp or 4 wires on a parallel port. after you become an arduino expert is a good time to play with avr tiny.
Old Feb 26, 2013, 08:09 PM
davidmc36 is offline
Find More Posts by davidmc36
No bounce, No play.
davidmc36's Avatar
Cool, thanks for the tips. I picked up the usbasp a bit ago. Will look into the ATMEGA chips.
Old Feb 28, 2013, 01:36 PM
davidmc36 is offline
Find More Posts by davidmc36
No bounce, No play.
davidmc36's Avatar
I have achieved what I wanted. The reason I was looking to use the Tiny was to make two independent flashers, one for beacon and one for strobe. Using the Nano I did some reading and learned a bit about writing code:

int led1 = 3;
int led2 = 4;
void setup() {
pinMode(led1, OUTPUT);pinMode(led2, OUTPUT);
}
void loop() {
digitalWrite(led1, HIGH);
delay(200);
digitalWrite(led1, LOW);
digitalWrite(led2, HIGH);
delay(30);
digitalWrite(led2, LOW);
delay(300);
digitalWrite(led2, HIGH);
delay(30);
digitalWrite(led2, LOW);
delay(300);
digitalWrite(led2, HIGH);
delay(30);
digitalWrite(led2, LOW);
delay(1000);
}

At ten bucks a pop they are a bit pricey to put one in each airplane but this will get me going for this season. Maybe next winter when I have more time I will work more on learning how to load each flasher onto separate Tiny chips. That would be a better device for smaller airplanes too.
Old Feb 28, 2013, 02:39 PM
dave1993 is offline
Find More Posts by dave1993
RC beginner
excellent job dave! (did i just pat myself on the back or... )

perfect eaxmple of how to get started with arduino or any other toolset for that matter. next you might try running that program on a stripped down homebuilt version and someday switch the 328 for a tiny. $1 instead of $10 and 1/10th the size/weight.

"10 bucks a pop a bit pricey" lol! i have to laugh! the original arduinos were $70 ea. and some people still pay that.
Old Feb 28, 2013, 06:19 PM
lmhart is offline
Find More Posts by lmhart
Registered User
lmhart's Avatar
You can use an Arduino Uno as an ISP for the attiny45/85/etc - if you have one handy, the instructions at the High-Low Tech site worked for me: http://hlt.media.mit.edu/?p=1695
Old Feb 28, 2013, 06:29 PM
dave1993 is offline
Find More Posts by dave1993
RC beginner
dave mentioned already having a usbasp and not dave, but dave, knows where you can get mega8s for 1/3 what dx charges: EBAY! seventy something cents ea.

its true dave does love these chips. bet you cant eat just one!
Old Feb 28, 2013, 06:32 PM
SadSack is offline
Find More Posts by SadSack
Registered User
bet your chewing on one


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Question Program/configure ESC with Arduino bogophan Multirotor Talk 12 Jun 28, 2012 07:28 PM
Discussion Multiwii Arduino Programming dyarrow Multirotor Talk 3 Mar 07, 2012 11:50 AM
Discussion Arduino RC Programs/routines library Tifani Multirotor Talk 0 Nov 07, 2010 04:26 PM
Discussion Engine Run In program using Arduino board cadzilla DIY Electronics 4 Aug 16, 2010 09:21 PM