Pages: [1]   Go Down
Author Topic: External crystal for Attiny85  (Read 4776 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like to employ an external 20MHz crystal for Attiny85.



I see that the crystal must be attached to pins 2 and 3. And datasheet gives us recommended values for the capacitors. OK.

However, the question is, pins 2 and 3, cannot be used for inputs/outputs if an external crystal is present?

Thanks in advance
« Last Edit: December 25, 2011, 10:39:18 am by ProfePaco » Logged

Offline Offline
Edison Member
*
Karma: 56
Posts: 2183
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Correct.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Scotland
Offline Offline
God Member
*****
Karma: 11
Posts: 988
Have you had your Arduino fix today?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi - You can use the pins as I/O if you do not use a crystal, You can set the chip to use an internal 8Mhz (or 1Mhz with divide by 8 set). OR run the chip at upto 20Mhz with the crystal & caps.  Having built over 100 projects with 45/85 chips, I have not used a crystal setup yet (other than on my programming board,  just incase I set the fuses to use external clock).
Logged

Drew.
http://www.uk-pcb.co.uk - My UK Based PCB Fab & Assembly Company
Design work undertaken
SMD & Thru-Hole assembly

Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi - You can use the pins as I/O if you do not use a crystal, You can set the chip to use an internal 8Mhz (or 1Mhz with divide by 8 set). OR run the chip at upto 20Mhz with the crystal & caps.  Having built over 100 projects with 45/85 chips, I have not used a crystal setup yet (other than on my programming board,  just incase I set the fuses to use external clock).

Yes... however in my case I need a lot of power because I have to make 3 FFT from 3 microphones continuously... so 20MHz better than 8. But I do not have pins enough if I use a external crystal.

I need 3 analogs input for the mics and one pin for sending the information to another Arduino.
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

... so 20MHz better than 8. But I do not have pins enough if I use a external crystal.
The AtTiny85 has a PLL circuit that can be used as a system clock source for 16MHz (64MHz / 4) operation. All you need is to program the approriate clock select fuse.
Logged

Rural Ozarka
Offline Offline
Newbie
*
Karma: 0
Posts: 33
Priest of the Screaming Electron
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

... so 20MHz better than 8. But I do not have pins enough if I use a external crystal.
The AtTiny85 has a PLL circuit that can be used as a system clock source for 16MHz (64MHz / 4) operation. All you need is to program the approriate clock select fuse.

Wow, thanks, that is mighty good to know.
Logged

Entrepreneurship, Arduino, Ham Radio & General Wannabe Hackery

http://insapio.com/
Twtr: @mltd_alexander

Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.obdev.at/products/vusb/easylogger.html here is an example of the attiny45 (but could be used on attiny85)  used with its internal oscillator at 16.5Mhz if you download the source code youll see how that its done

hope this helps
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 128
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the feedback!
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 117
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi - You can use the pins as I/O if you do not use a crystal, You can set the chip to use an internal 8Mhz (or 1Mhz with divide by 8 set). OR run the chip at upto 20Mhz with the crystal & caps.  Having built over 100 projects with 45/85 chips, I have not used a crystal setup yet (other than on my programming board,  just incase I set the fuses to use external clock).

Yes... however in my case I need a lot of power because I have to make 3 FFT from 3 microphones continuously...

If I am not mistaken, FFT on a single channel it a quite a stretch on a ATmega328 (Arduino) at 20MHz, so 3 channel FFT with tiny45/85, is it realistic ?
Logged

geo. area called Italia
Offline Offline
Full Member
***
Karma: 0
Posts: 190
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

old topic, but related question:

If I want to use the SoftwareSerial library with an Attiny85 I would use an external 20Mhz crystal?
Logged

Denmark
Offline Offline
Edison Member
*
Karma: 35
Posts: 1029
Happy Hobbyist
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Or tune the internal osccilator

http://forum.arduino.cc/index.php?PHPSESSID=02dq48s3merutqi5fnfgdll743&topic=183180.msg1357164#msg1357164
Logged

vermont
Offline Offline
Sr. Member
****
Karma: 6
Posts: 261
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

20mhz (actually 30mhz) is no problem for t85 using pll and oscal reg. however w/o a hardware multiplier fft would be hard.
Logged

Pages: [1]   Go Up
Jump to: