attiny and millis()

I am working on a project where, I believe, I need to write functions using millis(), and write my sketch to an attiny using arduinoISP. In a nutshell, the project will blink a number of LEDs at different intervals.

I read an article about using functions with millis(), and much of the discussion was related to the 16mhz crystal oscillator used on the arduino. I understand that the crystal will determine how "time" is handled in milliseconds, does this mean that I will have to add a crystal to the final project with the attiny?

My goal is to use a lower pin count attiny, but still keep the ability to run sketches developed on a retail arduino.

Sorry if this is a ridiculous question, and I find "RTFM" to be an acceptable answer, if one would be so kind as to point me to the correct FM.

Are you using one of the ATtiny cores out there, such as Arduino-Tiny? If so, then millis() is supported by the core. Like most AVR MCUs, the ATtiny series can run off either an internal oscillator or an external crystal. The internal oscillator is not guaranteed to be extremely accurate, and will vary with supply voltage and temperature, but it can be plenty good for blinking LEDs, etc. I built a project based on the ATtiny85 that just basically blinks LEDs, and used the internal oscillator. With only 8 pins you sort of hate to give up two for a crystal, anyway.

Love your comment about "which FM", one you will want will be the datasheet for the particular MCU you are using. Read the section on clock sources, and the section on fuse bytes which will indicate how to select the clock source you want. An ICSP programmer is an extremely handy thing to have, and well worth the $15-$20 or so. IMHO. Good luck, have fun!

Which attiny? For Attiny25 and better : http://code.google.com/p/arduino-tiny/ For Attiny13 (note, I am developing this and it may be buggy) http://arduino.cc/forum/index.php/topic,89781.0.html

[quote author=Jack Christensen link=topic=92023.msg691249#msg691249 date=1329265351] ...Arduino-Tiny?... [/quote] This is a completely new concept to me, is this sort of like a kernel on a *NIX system? Or is it more like a driver so to speak, so the IDE "just works" when I'm using this core?

[quote author=Jack Christensen link=topic=92023.msg691249#msg691249 date=1329265351] An ICSP programmer is an extremely handy thing to have, and well worth the $15-$20 or so. [/quote] I was going to program the chips with arduinoISP, doesn't that make the arduino an ICSP?

onef: [quote author=Jack Christensen link=topic=92023.msg691249#msg691249 date=1329265351] ...Arduino-Tiny?...

This is a completely new concept to me, is this sort of like a kernel on a *NIX system? Or is it more like a driver so to speak, so the IDE "just works" when I'm using this core? [/quote]

Yes, it gives the IDE the ability to program several ATtiny MCUs. The "core" is the collection of modules that implement the various Arduino-specific functions.

[quote author=Jack Christensen link=topic=92023.msg691249#msg691249 date=1329265351] An ICSP programmer is an extremely handy thing to have, and well worth the $15-$20 or so.

I was going to program the chips with arduinoISP, doesn't that make the arduino an ICSP? [/quote]

Yes, it does. A bit more trouble than a dedicated unit, though.