Pages: [1] 2   Go Down
Author Topic: Attiny85  (Read 2395 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey friends,

Recently I get myself some attiny 85.

I would like to ask do I need to add an external 16MHz crystal or what clock source been configured for the fresh attiny 85 ?

Besides, how can I program it using the arduino IDE ?

Is it I need a USBasp and connect the MOSI, MISO SCK and RESET besides the VCC and GND ?

Thank you
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I would like to ask do I need to add an external 16MHz crystal or what clock source been configured for the fresh attiny 85 ?

You do not need an external crystal.  From the factory, the processor is configured to run at 1 MHz using an internal oscillator.  Using the internal oscillator, the processor can be configured to run at 1, 2, 4, 8, or 16 MHz.  For all other frequencies you can use an external crystal.

Quote
Besides, how can I program it using the arduino IDE ?

These are good instructions...
http://hlt.media.mit.edu/?p=1695

This is a good alternative core...
http://code.google.com/p/arduino-tiny/

Quote
Is it I need a USBasp and connect the MOSI, MISO SCK and RESET besides the VCC and GND ?

You can also use any Arduino (or compatible) board.
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I use external crystal because I want to use it at 16MHz, then it means I lost 2 IO pins ?

Hehehe
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If I use external crystal because I want to use it at 16MHz, then it means I lost 2 IO pins ?

Yes.  Two pins are required for an external crystal.

The ATtiny85 is capable of running at 16 MHz using the internal oscillator.  You do not need an external crystal for that speed.  (The internal oscillator is less accurate and less stable than a crystal.  If you need an accurate and/or stable clock then you will have to use a crystal.)
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I configure the attiny 85 to use internal 16MHz crystal ?

By the way, can I confgure the atmega 328 to use internal 16Mhz oscillator too ? I thought atmega 328 just can have 1MHz internal
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

How do I configure the attiny 85 to use internal 16MHz crystal ?

Download and install the core available from here...
http://code.google.com/p/arduino-tiny/

Get it working with your processor at 1 MHz.

Select the ATtiny85 @ 16 MHz  (internal PLL; 4.3 V BOD) board.

Execute Tools / Burn Bootloader.

Enjoy.

Quote
By the way, can I confgure the atmega 328 to use internal 16Mhz oscillator too ?

No.  As far as I know, the ATtiny85 # is the only AVR processor that can run at 16 MHz using the internal oscillator.  The ATmega328 and all other AVR processor can run up to 8 MHz using the internal oscillator.

Quote
I thought atmega 328 just can have 1MHz internal

It has an 8 MHz internal oscillator that can be configured to run at 1, 2, 4, or 8 MHz.


# And siblings: ATtiny45, ATtiny25.
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i downloaded the link you gave me previously..and there is no attiny85(16MHz)..is it mean I have to download again with your new link ?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Did you follow the instructions in the readme.txt file?
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://hlt.media.mit.edu/?p=1695

I follow this just now smiley
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

* Open the "boards.txt" file and change both of the "upload.using" entries to
  the appropriate value for your setup.  Following from the examples above, the
  file would be here...

      C:\Projects\Arduino\hardware\tiny\boards.txt

* Start the Arduino IDE and ensure there are two new boards listed under the
  [Tools] [Board] menu...

      "ATtiny84 @ 8 MHz"
      "ATtiny84 @ 1 MHz"

You are now ready to use Arduino-Tiny!

What does the bolded part means ?

I did not do that. And my tools > board now not only contain the 2 new board, but also some others like what you mention(ATtiny85 @ 16 MHz  (internal PLL; 4.3 V BOD) board)


* Untitled.png (223.36 KB, 1366x808 - viewed 14 times.)
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

And some of my board type has gone missing smiley-sad
Logged

Offline Offline
Sr. Member
****
Karma: 1
Posts: 334
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

* Open the "boards.txt" file and change both of the "upload.using" entries to
  the appropriate value for your setup.  Following from the examples above, the
  file would be here...

      C:\Projects\Arduino\hardware\tiny\boards.txt

* Start the Arduino IDE and ensure there are two new boards listed under the
  [Tools] [Board] menu...

      "ATtiny84 @ 8 MHz"
      "ATtiny84 @ 1 MHz"

You are now ready to use Arduino-Tiny!

What does the bolded part means ?

I did not do that. And my tools > board now not only contain the 2 new board, but also some others like what you mention(ATtiny85 @ 16 MHz  (internal PLL; 4.3 V BOD) board)


I think for the bolded part means I just go and select the board type I need and required ? And delete others ? Hahaha
Logged

Australia
Offline Offline
Sr. Member
****
Karma: 10
Posts: 397
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If I  was using an ATtiny85 using the internal oscillator at 8Mhz divided down to 1 Mhz via the prescaler, which option would I use in the IDE:

ATtiny85 @ 8Mhz

or

ATtiny85 @ 1Mhz

Is there any difference in power usage, speed of processing, or anything else material, between running at 8Mhz divided down to 1 Mhz and running at 1Mhz with no prescaler?
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What does the bolded part means ?

Locate the boards.txt file that came in the Arduino Tiny zip file.  Open it.  Change the .upload.using lines to something like this...

Code:
attiny85at16p.upload.using=arduino:USBasp

Save and close the file.


Quote
I did not do that.

With Arduino 1.0 and higher you may not need to.  There is now a way to specify the programmer without editing boards.txt.
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 176
Posts: 12283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

And some of my board type has gone missing smiley-sad

Remove some of the entries from boards.txt that you will not be using.
Logged

Pages: [1] 2   Go Up
Jump to: