go_away

Author Topic: ATMEGA8 Crystal question **Please Help**  (Read 1970 times)

0 Members and 1 Guest are viewing this topic.

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
ATMEGA8 Crystal question **Please Help**
« on: September 27, 2009, 01:02:49 AM »
Hello all,

My current project builds off of a $50 dollar robot base. I added an 8 MHz crystal and put header pins on pins 15 and 16. The board seems to be working great. The trouble began when I went to set the fuse for the external crystal. The data sheet says something along the lines of "CKOPT 1, CKSEL3..1 111" When I look in AVR studio I see what is shown on the picture I'm attaching. I've guessed wrong twice. So when I get more chips in the mail I'm going to try again.

Does anyone know the correct settings for an 8 MHz crystal for the atmega8? How do I take what is in the data sheet and cross reference that to what is listed in AVR Studio?

Thanks
Conscripted
« Last Edit: September 28, 2009, 05:46:49 AM by Conscripted »

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: ATMEGA8 Crystal question **Please Help**
« Reply #1 on: September 28, 2009, 08:13:42 PM »
Anyone? I was hoping someone had a little experience with crystals on the atmega8.

Thanks
Conscripted

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: ATMEGA8 Crystal question **Please Help**
« Reply #2 on: September 28, 2009, 08:19:31 PM »
Are you including the caps from the crystal to ground?

Also, why do you need more chips for more fuse settings? If you guess wrong you should be able to change the fuse settings again.

As for me, on my mega168s/328s I choose the last setting on the list, which is usually on the lines of a high frequency external oscillator or something.

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: ATMEGA8 Crystal question **Please Help**
« Reply #3 on: September 28, 2009, 08:37:23 PM »
Thanks for the response razor,

I included the caps from crystal to ground. I read admins tut and looked through the data sheet before I added them to the 50$ board. Once I programmed the fuses the chips were no longer able to enter the programming mode. I assume it's because it's looking for timing other that what is provided. I imagine that if I supplied the correct timing the chips I have will still work. The fuses for the 168 are different then the ones listed for the atmega8. I still have one 168 that I haven't put into the circuit yet. I don't really want to ruin it too. What speed of crystal have you used? As I mentioned I'm using an 8MHz crystal. Maybe I should have used the internal clock. I was just trying to get the most "new" stuff into this project that I could.

Conscripted

Offline galannthegreat

  • Supreme Robot
  • *****
  • Posts: 615
  • Helpful? 4
  • Blue-Lensed Blue LEDs?! What?! Impossible!!
Re: ATMEGA8 Crystal question **Please Help**
« Reply #4 on: September 29, 2009, 12:30:55 AM »
Check the datasheet on fuses and the like, start on page 26.

http://www.atmel.com/dyn/resources/prod_documents/doc2486.pdf

Hope that helps. :)
Kurt

Offline Razor Concepts

  • Supreme Robot
  • *****
  • Posts: 1,856
  • Helpful? 53
Re: ATMEGA8 Crystal question **Please Help**
« Reply #5 on: September 29, 2009, 03:49:15 AM »
What were the two wrong settings you have guessed?

Offline ConscriptedTopic starter

  • Robot Overlord
  • ****
  • Posts: 291
  • Helpful? 10
Re: ATMEGA8 Crystal question **Please Help**
« Reply #6 on: September 29, 2009, 05:45:46 AM »
I did read that information on page 26 of the data sheet. I included the information in my first post. I just don't understand how to translate that information into the options that are listed in AVR studios. I only see what is included in the picture I attached. I was hoping someone had a rosetta stone that could help me translate one into the other. As for which two guess I already made. I'm pretty sure that the first time I selected external clock and the second I selected "external crystal/resonator medium freq" with a random startup time.

Conscripted

 


Get Your Ad Here