Crystals, oscillators and resonators

Discussions on how to get your MSP JTAG programmer up and running.

Moderator: phalanx

Post Reply
GregoireLeGros
Posts: 2
Joined: Sat Jul 14, 2012 5:23 pm

Crystals, oscillators and resonators

Post by GregoireLeGros » Sat Jul 14, 2012 5:31 pm

I got myself a Launchpad kit and am tinkering with it and learning a little. I'd like to build a frequency counter and I think I can use an MSP430 type to count ticks between rising edges on the signal to be measured. If I wanted to measure a frequency of say 10 Mhz what sort of MSP430 should I use ? What is the difference between the crystal, the oscillator and the resonator and what value should I use to build my frequency counter ?

FLOWMEET
Posts: 8
Joined: Fri Dec 03, 2010 5:55 am

Re: Crystals, oscillators and resonators

Post by FLOWMEET » Fri Nov 23, 2012 2:39 pm

I can't figure out how to measure 10MHz frequency with reasonable resolution using MSP uC, without using any external support

1. Crystal, usually yo can get if in very wide frequency range, 32768Hz is the most used over MSP430
2. Ceramic are cheaper than crystal, but only appreciated for mass production, I think its true for very very large production, and it is no so accurate like crystal
3. Oscillator, I think you want say internal oscillator, it is formed by two on chip passive components, a resistor and capacitor, may by external too, it it not recommended for time measurement, it is too temperature dependent.

Best Regards
Daniel
http://www.flowmeet.com

User avatar
viskr
Posts: 263
Joined: Tue Jun 20, 2006 10:29 am
Location: Lake Tahoe, CA
Contact:

Re: Crystals, oscillators and resonators

Post by viskr » Sat Nov 24, 2012 2:38 pm

You'll want to use a crystal, the other options don't offer accuracy much better than 1%, where even a cheap crystal will be better than 100 ppm (0.01%).

Most any micro will have a timer element (including the MSP430), and that is the way to provide accurate timing.

Basically you will time a number of events (transitions on a pin vs counts of the internal crystal oscillator).
reviving the BASIC stamp http://www.basicchip.com

GregoireLeGros
Posts: 2
Joined: Sat Jul 14, 2012 5:23 pm

Re: Crystals, oscillators and resonators

Post by GregoireLeGros » Sun Nov 25, 2012 11:14 am

I see that some MSP430 have a cpu speed of 25Mhz. Would that impose a limit on the frequency I could potentially measure. Would I be able to count transitions at a greater rate than the clock speed ?

User avatar
viskr
Posts: 263
Joined: Tue Jun 20, 2006 10:29 am
Location: Lake Tahoe, CA
Contact:

Re: Crystals, oscillators and resonators

Post by viskr » Sun Nov 25, 2012 12:49 pm

I can't speak to the timers of the MSP430, but in ARM timers, you can set the up to count transitions and when a certain count is reached as compared to a match register, the time of that event can be captured in a register.

So you count 1000 or transition and capture the time in terms of the internal clock, and that gives the resolution you need, if you need more time more than 1000 transitions.
reviving the BASIC stamp http://www.basicchip.com

FLOWMEET
Posts: 8
Joined: Fri Dec 03, 2010 5:55 am

Re: Crystals, oscillators and resonators

Post by FLOWMEET » Mon Dec 03, 2012 5:07 am

For some model you can use external clock source and async mode for capture functions, how much resolution do you want ?



Best regards
http://www.flowmeet.com

Post Reply