Go Down

Topic: Crystal question. (Read 1 time) previous topic - next topic

ashish-k

i have some mega328 and mega8, my question is,
Can i use 20mhz crystal oscillator instead of 16mhz ???

Tahnkx
Rock it n loop it.

johnwasser

Not without writing your own Arduino core.  The standard core only works with clock frequencies that are a multiple of 8,000,000 and 1,000,000.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

RPCoyle

That's funny because, a while back, I bread boarded up a project and I didn't have a 16.0 crystal so I tried a 14.74 I had in the parts drawer, and it seemed to clock OK.

johnwasser


That's funny because, a while back, I bread boarded up a project and I didn't have a 16.0 crystal so I tried a 14.74 I had in the parts drawer, and it seemed to clock OK.


If you check carefully you will find that millis(), micros(), delay(), and delayMicroseconds() will be off by various amounts.
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

RPCoyle

That is probably so, I never checked since this was just an art project. I'll make sure I have 16.00 mhz for any project requiring accurate clocking.

Go Up
 

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.
Name:
Email:

shortcuts: alt+s submit/post or alt+p preview