Subscribe to EDN
RSS
Reprints/License
Print
Email

µC forms FM oscillator

By Abel Raynus, Armatron International, Melrose, MA -- EDN, October 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).


RSS
Reprints/License
Print
Email
Talkback
Canon Resource Center

Featured Company


Most Recent Resources

Advertisement
Related Content

No related content found.

  • 0 rated items found.
Advertisement

KNOWLEDGE CENTER

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)
Featured Job On
Scroll for More Jobs
Advertisement
About EDN   |   Site Map   |   Contact Us   |   Subscription   |   RSS
© 2012 UBM Electronics. All rights reserved.
Use of this Web site is subject to its Terms of Use | Privacy Policy

Please visit these other UBM Canon sites

UBM Canon | Design News | Test & Measurement World | Packaging Digest | EDN | Qmed | Pharmalive | Appliance Magazine | Plastics Today | Powder Bulk Solids | Canon Trade Shows