about crtstal oscillator

Go To Last Post
18 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

what is the maximum frequency crystal oscillator we can connect to ATMEGA 32 mcu.

when i connect 4 Mhz crystal it's working .

when i connect 8  Mhz crystal it's working but not in proper way.

when i connect 16 Mhz crystal it's not working and when i connect it for code transfer it fail so what i do please help me

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What does the datasheet tell you?

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

What  is the MCU supply voltage (at the MCU's power pins)?

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

balvendra wrote:

what is the maximum frequency crystal oscillator...when i connect 4 Mhz crystal...

 

An oscillator is not a crystal. Which are you using? You need to learn the difference or one day you will set your fuses wrongly.

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
An oscillator is not a crystal ... You need to learn the difference

This may help: https://e2e.ti.com/support/micro...

 

EDIT

 

See also: https://www.avrfreaks.net/forum/e...

 

 

EDIT 2

 

But note that the AVR datasheet terminology is unhelpful: https://www.avrfreaks.net/comment...

 

 

#CrystalVsOscillator

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. May 29, 2018 - 02:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

5 volt

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

this was mistook in typing i am using external crystal

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

from data sheet i could not get idea about that so i am asking here

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

At 5V a mega32 should run with a 16MHz crystal.

 

What value capacitors have you connected to the crystal?

 

What are your fuses set to?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

balvendra wrote:
from data sheet i could not get idea about that

Really??

 

surprise

 

 

EDIT: See also the sections titled, "Clock Sources" (p25) and "Crystal Oscillator" (p26) 

 

Page references to the 2503Q–AVR–02/11 document revision.

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
Last Edited: Tue. Jul 4, 2017 - 07:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Capacitor - 22 pf
Fuse - EE OD

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I set fuse bit using eclipse like this

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

balvendra wrote:
Capacitor - 22 pf Fuse - EE OD

 

 

I'd be tempted to give the crystal a bit longer to start up. Unless I'm in a hurry I always use the slowest settings...

 

 

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Your picture shows CKOPT set to No.
.
It MUST be enabled for crystals of 8MHz and above or the drive is not strong enough for it to resonate.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
Your picture shows CKOPT set to No.
.
It MUST be enabled for crystals of 8MHz and above or the drive is not strong enough for it to resonate.

I had never programmed ckopt unless I need to drive other device with the same clock source or noisy environment.
.

I guess the OP is working with UART or time critical.
How can he be sure it's working or working but not in the proper way?

.

MG

I don't know why I'm still doing this hobby

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MicroGyro wrote:

How can he be sure it's working or working but not in the proper way?

 

Aha, I wonder if the OP means that his programming fails? In which case, are we looking at an ISP speed issue?

#1 This forum helps those that help themselves

#2 All grounds are not created equal

#3 How have you proved that your chip is running at xxMHz?

#4 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand." - Heater's ex-boss

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

22 pf capacitor is right value???
and i am using usbtiny so can it communicate with mcu at all frequency??

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

balvendra wrote:
22 pf capacitor is right value???
and i am using usbtiny so can it communicate with mcu at all frequency??

You mean your usbtiny? Of course you can.
Set your isp clock 1/4 of your mcu clock.
.
Brian Fairchild wrote:
Aha, I wonder if the OP means that his programming fails? In which case, are we looking at an ISP speed issue?

You are right :D
.
MG

I don't know why I'm still doing this hobby