element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Arduino
  • Products
  • More
Arduino
Arduino Forum how to attach crystal?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Arduino to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 19 replies
  • Subscribers 396 subscribers
  • Views 1485 views
  • Users 0 members are here
  • crystal
  • oscillators
  • avr
  • atmega328p
Related

how to attach crystal?

rishi2628
rishi2628 over 10 years ago

i am making a custom board using atmega328p. i am programming the chip using a arduino uno board which works fine but when i attach the microcontroller to the development board, the delay function doesn't seem to work. I think there is a problem with the oscillator. I have simply connected a crystal at xtal pins. Is this the correct way??

  • Sign in to reply
  • Cancel

Top Replies

  • gadget.iom
    gadget.iom over 10 years ago +4
    Something like this... Google "arduino bare bones"
  • mcb1
    mcb1 over 10 years ago in reply to clem57 +3
    clem57 I see to recall we had a very similar discussion not that long ago. ... The Bare Bones project tend to use a resonator, although they talk about a xtal and neglect to say you need the capcitors…
  • Robert Peter Oakes
    Robert Peter Oakes over 10 years ago in reply to clem57 +3
    I tend to prefer a real xtal and a couple of caps, this gives a much more precise loop time. Either will work without issue and the cost is still measured in Pennies or Cents If your making thousands then…
  • gadget.iom
    0 gadget.iom over 10 years ago

    What frequency is your crystal?

    Have you connected 20/22pF capacitors between the XTAL pins and gnd?

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 10 years ago

    If you search for schematics there are plenty to show you need 2 x 20pF caps and a resistor.

     

    Mark

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gadget.iom
    0 gadget.iom over 10 years ago

    Something like this...

     

    image

     

    Google "arduino bare bones"

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago

    Please post a schematic or pictures showing what you have. Had to visualize without details.

    Thanks,

    clem

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rishi2628
    0 rishi2628 over 10 years ago in reply to clem57

    this is how i have connected the oscillatorimage

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rishi2628
    0 rishi2628 over 10 years ago

    i was wondering ..........what if i replace the complete circuitry of the crystal oscillator with only a ceramic oscillator..........then will it work??

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • clem57
    0 clem57 over 10 years ago in reply to rishi2628

    You need the capacitors as well! This allows the charge up on either side of the crystal....

    Add a 16 MHz external clock between pin 9 and 10, and add two 22 pF capacitors running to ground from each of those pins.

    Quote from http://www.arduino.cc/en/Main/Standalone

     

    Clem

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mcb1
    0 mcb1 over 10 years ago in reply to clem57

    clem57

    I see to recall we had a very similar discussion not that long ago.  ...image

     

    The Bare Bones project tend to use a resonator, although they talk about a xtal and neglect to say you need the capcitors.

    http://moderndevice.com/wp-content/uploads/resources/bbb-kit/BBB_RevE_Instructions03.pdf

     

     

    But seriously can no-one use the google search to find the million or so links for building their own Arduino.?

    image

     

    This has some links that land on the wrong page, but does get you there.

    http://playground.arduino.cc/Learning/AtmegaStandalone

     

     

     

    Mark

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • gdstew
    0 gdstew over 10 years ago in reply to rishi2628

    The Arduino Uno uses a ceramic resonator and they usually have the capacitors built into them.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rishi2628
    0 rishi2628 over 10 years ago

    suppose i want to select the internal oscillator of the microcontroller...............how will i do it on the arduino ide??..............what setting do i have to change.........or what is the code to select the internal oscillator?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube