Pages: [1] 2   Go Down
Author Topic: Quartz crystal  (Read 1544 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is a quartz crystal required for the Atmel Atmega328 for it to work when its not in the arduino?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If it was programmed & running as a standard Arduino board, yes.
16 MHz crystal, 22pf caps, 100nF caps, 10K pullup resistor, can be purchased quite inexpensively from
www.dipmicro.com and www.taydaelectronics.com.

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

im not doing an arduino breadboard im doing a project that doesn't want to work all the pins are soldered to the right places(using headers of course) but when i give power to the atmel atmega 328 nothing happens just a blank LCD.
Do i still need all the component's you listed for it to work or just the crystal?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Some will claim it will work fine with less than what I listed - I have Never had a board not reliaby work when it had that minimal set of parts installed.
My Arduino project designs start from this, and I add more parts as needed.


* Bare_minimum_uC.jpg (66.33 KB, 960x720 - viewed 95 times.)
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Is a quartz crystal required for the Atmel Atmega328 for it to work when its not in the arduino?

No.
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Do i still need all the component's you listed for it to work or just the crystal?

The minimum part to get a mcu to work is the mcu itself.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

dhenry,
Can you explain the process for Arduino99 for re-burning the fuses for '328 operation without an external crystal once the uC has been removed from the Arduino board?  I know many do it with avrdude commands, I've not had luck with that myself.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While it is true that a crystal is not required, the '328p must be correctly configured using what is known as the 'fuse bits' to operate without a crystal.   When you do that, there are several choices for which internal oscillator speed to use.  All of this has to line up with the build settings or you get clocks running at the wrong rate, if they run at all.  None of it is setup for what you want to do "out of the box" on a raw '328p, sorry to say.

If you put a '328p that is fuse-configured to expect a crystal oscillator into a breadboard that doesn't have one, it won't work because it isn't getting the clock it expects.  This is one possible explanation for your system appearing dead.

It would be helpful to know where you got the '328, whether it has a bootloader on it and what the fuse settings are.  Do you have an Arduino board or an AVR programmer to set fuses with?

Also, have you checked the voltages at the +VCC and GND pins on the '328p with a voltmeter (or even an LED) to make sure they're about right?

Finally, it makes sense to put at least a 10uF electrolytic decoupling capacitor on the power input to the arduino.  It may run without it, but will die at the first glitch, leaving you wondering what happened.  Bad practice.


-br
Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
just a blank LCD.

There could be many other reasons why that's the case.

The simplest test to see if your mcu is working (or if you can burn a piece of code into the mcu) is to flip pins.

Logged

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

While it is true that a crystal is not required, the '328p must be correctly configured using what is known as the 'fuse bits' to operate without a crystal.   When you do that, there are several choices for which internal oscillator speed to use.  All of this has to line up with the build settings or you get clocks running at the wrong rate, if they run at all.  None of it is setup for what you want to do "out of the box" on a raw '328p, sorry to say.

If you put a '328p that is fuse-configured to expect a crystal oscillator into a breadboard that doesn't have one, it won't work because it isn't getting the clock it expects.  This is one possible explanation for your system appearing dead.

It would be helpful to know where you got the '328, whether it has a bootloader on it and what the fuse settings are.  Do you have an Arduino board or an AVR programmer to set fuses with?

Also, have you checked the voltages at the +VCC and GND pins on the '328p with a voltmeter (or even an LED) to make sure they're about right?

Finally, it makes sense to put at least a 10uF electrolytic decoupling capacitor on the power input to the arduino.  It may run without it, but will die at the first glitch, leaving you wondering what happened.  Bad practice.


-br

Its from the arduino uno it does have bootloader burned onto it
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If it's from a commercial Arduino, it's fused to expect a crystal.  You'll need a crystal and two decoupling caps to get it running as fused, or you could re-fuse it to run without.

Cheers,

-br
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

So, back to reply #3 then.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have acquired and installed a quartz crystal and now the lcd screen flashes violently how do i fix this?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Violently? That's a new one on me. Does anything else work normally? Like a message sent to the serial monitor?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 62
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Never mind It was the battery it was flat lol
Logged

Pages: [1] 2   Go Up
Jump to: