Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: karlis on August 28, 2011, 05:52:31 AM

Title: about external crystals
Post by: karlis on August 28, 2011, 05:52:31 AM
Hello.

Since i`m not a pro in electronics nor programming, and i`m willing to learn a lot in these areas, i`m wondering, if i realy need to connect external crystal to MCU ? Or it is needed only when i want to operate in higher frequency or in some specific frequency?

I have Atmega16 and Atmega8 wich is dead due fuse bit fail :(

My goal is to make a tank robot (have 4 360 deg. hacked servos) and in future tachometer for car.

Thans for your responses.
Title: Re: about external crystals
Post by: Soeren on August 28, 2011, 05:51:32 PM
Hi,

[...] i`m wondering, if i realy need to connect external crystal to MCU ? Or it is needed only when i want to operate in higher frequency or in some specific frequency?
Some controllers need a crystal, others can (also) be run from an external RC oscillator with a timing accuracy of around 1%, if less accurate timing can be tolerated.

IOW If you're going to do anything time critical, like high speed comms, event timing or similar, you need a crystal. For most other jobs, the internal oscillator will be fine.

A 1% error is the equivalent of 14.4 minutes in 24 hours, so clearly the RC oscillator is a nogo for a time keeping job.


I have Atmega16 and Atmega8 wich is dead due fuse bit fail :(
How do you determine the cause to be brickin'?

Do you hope to bring them back?
If so, here's a couple of possibilities, but I'd personally use them as door stops and just get new ones, but of course, if you keep bricking them... If you've killed them in off any other way, there's no help in those.
http://www.mtcnet.net/~henryvm/4AvrFuseBuster/ (http://www.mtcnet.net/~henryvm/4AvrFuseBuster/)
http://www.der-hammer.info/hvprog/index_en.htm (http://www.der-hammer.info/hvprog/index_en.htm)


My goal is to make a tank robot (have 4 360 deg. hacked servos) and in future tachometer for car.
You only need 1 servo/motor for a tank thread. With 2 motors, they will be battling each other if they're not exactly the same speed (and they never are).
Title: Re: about external crystals
Post by: joe61 on August 28, 2011, 08:34:27 PM
I have Atmega16 and Atmega8 wich is dead due fuse bit fail :(

In addition to the links Soren provided, there's a tutorial about recovering from bad fuse programming on the avrfreaks site http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325 (http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=106325)

I've used this info to recover a few mistakes with clock bits, for the others, I just ordered one of these, and I'm learning to be more careful :-)

http://mightyohm.com/blog/products/hv-rescue-shield-2-x/ (http://mightyohm.com/blog/products/hv-rescue-shield-2-x/)

Joe
Title: Re: about external crystals
Post by: karlis on August 29, 2011, 12:11:36 AM
Yes i would like to unbrick them some day, and i beleave i messed it up with wrong external clock fuse, but i have added a crystal befour that, i`ll try with bigger crystal, maybe it brtings it back from the dead :)

Thanks for your replies, they were realy helpfull
Title: Re: about external crystals
Post by: Soeren on August 29, 2011, 10:15:16 PM
Hi,

[...] i`ll try with bigger crystal, maybe it brtings it back from the dead :)
The size of the X-tal won't change a thing.
Title: Re: about external crystals
Post by: karlis on August 30, 2011, 11:29:52 AM
so its a goner, thanks for information ;)