![]() | ![]() | ![]() |
| | |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| I hope I’m posting this to the right thread… As soon as my parts arrive I want to build a project based on a PIC, now at this point I should mention I’ve never tinkered with PIC’s before so I know nothing about them… Ok my question is this… the circuit I want to build calls on a 13MHz Crystal the PIC in the circuit is a 16F870, which according to it’s datasheet can run up to 20MHz (correct me if you know I’m wrong) Anyway I was just wondering seeing I can’t find a 13MHz Crystal but I can find a 10 or 20MHz one could I replace the called for Crystal with one of the two I can get and if I do so, will that mean I have to change the code I’m meant to load onto the PIC (and is changing the code like what I’m asking even possible?) I hope this makes sense. Thank you in advance… Dawn. | |
| |
| | (permalink) |
| It depends why it uses such an unusual value?, the two most common frequencies used are 4MHz and 20MHz - presumably there's a good reason for it using a 13MHz one?. | |
| |
| | (permalink) |
| Timing accuracy is usually the reason to use a crystal instead of the internal oscillator. You can get a crystal or oscillator made specially for not too much money, or you can change to code to keep the timing correct with a different crystal. If you tell us something about the application, we might be able to work out how critical the timing is. | |
| |
| | (permalink) |
| oh the application is this thing http://hem.passagen.se/communication/frcpll.html | |
| |
| | (permalink) | |
| You will need to get the specified crystal if you are not comfortable on modifying the original software of the PIC to use other more standard frequency crystals. See the following quote from that website. Quote:
__________________ L.Chung | ||
| |
| | (permalink) |
| You did not say where you live so it is difficult to let you know where to look for parts. In the US I often use Mouser. They have 549-CVT25-13 from Crystek Crystals Data Sheet Mouser's discription say 130MHz but in another column it lists the frequency as 13 MHz. The 130 must be a typo. About $8 Post some pics when you get it working. | |
| |
| | (permalink) |
| I'm Australain. | |
| |
| | (permalink) |
| Okay going back to my first question and adapting it slightly in your opinions how hard would it be for me to change the code of the 16F870 to make it suitable with a 10MHz or 20MHz Crystal? Dawn. | |
| |
| | (permalink) | |
| Quote:
Mike. | ||
| |
| | (permalink) |
| oh well thank you anyway. Guess I should look for a differentfrequency counter that uses more common parts. Dawn. | |
| |
| | (permalink) |
| Or, write the author and ask for a different version. Some are more than willing. Or, possibly easier, spend the 1.0 € for the specified crystal. He claims shipping is (1€ - 2.5€ Worldwide). | |
| |
| | (permalink) |
| That reminds me I've got to finish the Frequency counter on the Dragonfly. Was much easier to use a 18F2525 as its got a gated timer. ![]() | |
| |
| | (permalink) |
| It's probably best to tinker with PICs so that among other things (the thrill of making stuff happen) you may have some idea of what to do if something goes wrong. Now I realize that writing the code for this yourself is a bit far fetched at the moment. It seems to me that a 13Mhz crystal was either something he had on hand and needed to get rid of or some tight code loop needs exactly the right crystal frequency. Using LEDs does place some overhead on the task, as does serial communication. Were I to make one, which some day I hope to, I would used a timed interrupt every millisecond to read TMR1 and figure how far it has advanced since the last iteration. This will allow up to 65MHz, which is beyond the rating of TMR1's input of 50MHz. The external chip is a high speed divider, which is what I would use to get the high MHz or GHz range. That much having been said, I recommend looking around for another project like this one. I believe you'll be able to find one that uses most of the same parts, except for a more common crystal. After finding the above mentioned article independently when running another search, I thought about it more. This is the first one I've noticed that has an RF probe built in- wonderful if you're a radio enthusiast but may complicate using it some times. Last edited by ldanielrosa; 12th November 2007 at 03:05 AM. | |
| |
| | (permalink) | |
| Quote:
I will give you a clue to do it, first you must set the ic pll as test mode, so you will get the N counter at the output cpo pin (at lmx2322) or LD pin (lmx2346). Download the datasheet and read it so you know what i mean. And finally you will only need a routine to measure the frequency. I've try it, but i'm not good enough with tmr, sorry By the way, i've stock for 13Mhz smd from ABracon.
__________________ http://www.henryelectronics.com | ||
| |
| | (permalink) |
| For pic it is better to use crystals of multiple of 4 MHz. like 4 Mhz , 8 MHz , .... uptil 40 MHz depending on type of pic controller.... Better to start with 4 MHz.... it will be ok... Avoid 12 MHz for better accuracy... Regards, Simran..
__________________ Simran.. 8051 Specialist.. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| cap values for crystal | mactack | Micro Controllers | 12 | 18th August 2006 06:18 AM |
| Crystal or Crystal Oscillator? | eblc1388 | General Electronics Chat | 4 | 21st August 2005 05:43 PM |
| Crystal questions | zachtheterrible | General Electronics Chat | 7 | 9th April 2005 03:19 PM |
| Crystal oscillator questions | Johnson777717 | Micro Controllers | 0 | 19th August 2004 11:41 PM |
| Sharing a crystal between 3 ICs | DaKandEKid | Electronic Projects Design/Ideas/Reviews | 3 | 12th May 2004 03:18 AM |