Using Arduino platform for AtTiny's programming

Hello everyone,

Have you ever read this article http://hlt.media.mit.edu/?p=1229 ?? In this link is explained how to use the whole Arduino environment for AtTiny45/85's programming (software 0022 version to make the programs and the Arduino UNO or Duemilanove as a programmer)....

My question is ... once I've choosed AtTiny85 (from Tools/Board menu) how do I tell the program that I'm going to use the AtTiny at 20Mhz clock ?? And the other question is ... can I use the whole functions set for the AtTiny85 exactly if I were programming an Arduino?? for example, can I use the SoftwareSerial library for the AtTiny ??

I'll wait for your answers, thanks!!

Hello,

lu2is:
Have you ever read this article http://hlt.media.mit.edu/?p=1229 ??

Yup. Good article.

My question is … once I’ve choosed AtTiny85 (from Tools/Board menu) how do I tell the program that I’m going to use the AtTiny at 20Mhz clock ??

You will have to add an entry to the boards.txt file.

And the other question is … can I use the whole functions set for the AtTiny85 exactly if I were programming an Arduino??

No. The ATtiny85 does not have a hardware UART. Nor direct support for SPI. Nor direct support for I2C. And probably some other things I cannot recall at the moment.

for example, can I use the SoftwareSerial library for the AtTiny ??

No. I believe NewSoftSerial works but requires some modifications.

Ok thank you, I'm new in all this as you can see ;)

In the boards.txt file there's a section that says "...build.f_cpu=1000000" is in there where a I must type "20000000" to set the clock at 20MHz ??

Yes I know there's a lack of hardware for the AtTiny, I'll check if NewSoftSerial works.

Thanks again!

lu2is: In the boards.txt file there's a section that says "...build.f_cpu=1000000" is in there where a I must type "20000000" to set the clock at 20MHz ??

Yes. And add a 20 MHz crystal+capacitors or resonator to the circuit.

You can use SoftwareSerial without modifications with the Attiny85 using these pins

rxPin 1 txPin 3

Yes of course, and thankyou Coding Badly!

Erni, those pins (1 and 3) are the only ones that work fine using SoftwareSerial library ?? ... Or can I set other ones like 5 and 6 ?? ... the thing is that I need pin 2 and 3 to connect the 20MHz crystal.

Thanks for your answers!

Yes you can use rxPin 1 txPin 0, physical it is pin 5 and 6

Ok that's good. I was reading about the NewSoftSerial library and that's an improved version of the SoftwareSerial library.

Do you know if this library inherits from SoftwareSerial all that's needed to support the AtTiny85 ?? that will be great 'cause it's an improved version in terms of performance.

Regards from Mexico!

I have never used NewSoftSerial library so i cant say if you can use it without some modifications on the Attiny85.

Greetings from Denmark :D

Ok, I'll hope to have one attiny85 by the end of this week to can do some tests that I will share at this forum. Later I'll prove the NewSoftSerial.

In this page http://www.obdev.at/products/vusb/index.html is the firmware to use USB in the AtTiny without any extra chips! I'll try this through the next weeks.

I'm really impressed with the Atmel microcontrollers, specially the AtTiny ones and the forums about these micros like this (arduino forum) and I'm going to leave the PIC micros for a while to test Atmel...

Really I hope to can contribuit something to this community and as I've said I'll start with this tiny and powerfull microcontroller, looks very promising ;)

Thanks.

There is a ATtiny85 microcontroller on the business card that becomes an USB keyboard pre-programmed to type out text when it detects that CAPS-LOCK has been pressed a few times. It can store about 5K characters using an ATtiny85.

http://frank.circleofcurrent.com/cache/usbbusinesscard.htm

http://frank.circleofcurrent.com/cache/hid_tutorial_1.htm

I ordered 12 for less than $1.40 each. Only 512 bytes SRAM, 512 bytes EEPROM and 8K flash. Only 6 I/O pins.

Run slow and lean enough, 2.7V operation is possible. Needs less solar panel.

I was wondering, is it board.txt that specifies the fuse bits?

I have seen those pages but I didn't have many time to study the code that's explained. I'm really new in the arduino and atmel microcontrollers world but from what I have seen I guess the boards.txt file is for memory, clock and programmer settings. I'm waiting for the begin of the next week to test these tiny micros.. I'll get them in a monterrey, mexico electronic store for around $4.5 dollars, a little more expensive :(

GoForSmoke: Run slow and lean enough, 2.7V operation is possible. Needs less solar panel.

1.8V for the ATtiny85V. They seem to be reliable at least down to 1.6V but that violates the specifications.

I was wondering, is it board.txt that specifies the fuse bits?

If you use this core...

http://code.google.com/p/arduino-tiny/

...you can use Burn Bootloader to change the fuse settings.

1.8V for the ATtiny85V. They seem to be reliable at least down to 1.6V but that violates the specifications.

Wow that’s tiny volts. Someone should see if they can power one with a steel and copper nail stuck into a lemon. :wink:

Lefty

Wow that's tiny volts

Not enough to ignite the attached LEDs. Which was a bit annoying.

That was the point when the 2 * AA batteries completely died.

Someone should see if they can power one with a steel and copper nail stuck into a lemon

What made you think of that?

Tiny processor + piezoelectric buzzer + lemon battery =

http://www.youtube.com/watch?v=5tHHRpAzGcM&noredirect=1