µC forms FM oscillator

By Abel Raynus, Armatron International, Melrose, MA -- EDN, 10/28/1999

A project required an inexpensive oscillator whose frequency increased step by step from 200 to 400 Hz and then decreased to 200 Hz. The first step was to design a VCO with a staircase driver. However, this approach entailed at least four ICs and many discrete components. An alternative method (Figure 1) requires only one 16-pin µC (an MC68HC705KJ1, costing less than $1) and only a few external components. The process takes place exclusively in software (Listing 1). The µC generates a burst of 256 cycles of a given period. After that, the period decrements or increments, and the µC generates a burst with the new period. The choice of decrement or increment depends on the contents of the flag register. If the flag is zero, it is a sign to decrement; otherwise, to increment. When the set of frequencies reaches completion, the content of the register inverts. So, in one operation, the frequencies grow; in the next, they decrease.

Keep in mind that a linear change in the value of the period causes a nonlinear change in the frequency value (according to a hyperbolic curve). So, you should perform all calculations in the time domain, rather than in the frequency domain. In our application, the nonlinear aspect of the frequency is unimportant. However, if necessary, you can realize any kind of FM by organizing the table of frequencies corresponding to each step. The design determines the period resolution, DT. In this case, it equals 0.02 msec, because this value allows you to use only one 8-bit register (HPER) to perform all period-changing operations

For more precision, you could use two or more registers. The number of frequencies in the set is K2MAX=(TMAX–TMIN)/T. You can determine any frequency is the set as:

Flag=0; fK=1/(TMAXT*K2).

Flag=1; fK=1/(TMIN+T*K2).

Table 1 shows some of the frequencies. The duration of the set is t=½(TMAX+TMIN)*K1MAX*K2MAX. In this case, t=2 msec (DI #2432).




Reed Business Information Resource Center

Featured Company


Related Resources

ADVERTISEMENT

ADVERTISEMENT

Feedback Loop


Post a CommentPost a Comment

There are no comments posted for this article.

Related Content

 

By This Author


ADVERTISEMENT

Knowledge Center



Technology Quick Links

EDN Marketplace


©1997-2009 Reed Business Information, a division of Reed Elsevier Inc. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other Reed Business sites