Pages: [1]   Go Down
Author Topic: DIY-duino. 20MHz crystal Ok just to get started?  (Read 1407 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 97
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

I wanted to breadboard an Arduino today and must rely on my local Maplin (eg RadioShack) for some parts. I've checked stock online and the only suitable crystal oscillator modules they have are 20Mhz. Can I use this for now just to get up and running?

They also have 4, 10, 6, 3.579 (!) MHz crystals but not in U4 style case. Would one of these be better?

Thanks
Logged

Lancashire, UK
Offline Offline
Edison Member
*
Karma: 9
Posts: 1991
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It depends on if you're using anything that is timing critical (like serial or programming it on the breadboad). See if they have a 16 Mhz ceramic resonator, a better substitute than a 20 Mhz crystal.  (you don't need the capacitors either).  You tweak the legs a bit to fit a breadboard........
« Last Edit: December 14, 2010, 09:15:44 am by stephen_t » Logged


Sweden
Offline Offline
Full Member
***
Karma: 11
Posts: 237
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm not 100% shure but I think you only need to change
-----.build.cpu_p.16000000L

in the boards.txt file.

Change "-----" to the name of your Arduino and 16000000L to the frequency of your crystal in Hz.

I can't check if this is right because I'm not sitting on an computer with the IDE installed.

But I'm pretty shure you can change the frequecy of the Arduino, How would other wise the Arduino Pro be available in a 8MHz version?

Jan
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 97
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks.

Craplins only have a 4MHz ceramic. My ATMega328 came with a bootloader burnt in already. I read a post that suggested the bootloader code hardwires the clock frequency so would I need to flash a new bootloader too?

Darn it! Maplins do a 16MHz crystal they just have none in stock!
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 200
Posts: 12773
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Theoretically, you can use the existing bootloader.  You just need to adjust for the difference...

 20 / 16 * 57600 = 72000 baud

Change the upload speed to 72000 baud.
Logged

London
Offline Offline
Sr. Member
****
Karma: 1
Posts: 330
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset



Maplins arnt the best for range of parts but if you order a few crystals or resonators from the website it should be with you next day in a small jiffy bag. There mail order is probably there best service.
Ive ordered up to 6pm in the evening and had the parts the next day.
But the earlier in the day the better.

Gordon
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 97
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I decided not to be so impatient in the end and order what I really needed from Farnell. Wednesday will be breadboard fun day huzzah!

Maplins aren't so bad no I was being a bit mean although delivery is normally day after next for me for some reason.
Logged

Pages: [1]   Go Up
Jump to: