International Journal of Engineering and Advanced Technology (IJEAT)
ISSN: 2249 – 8958, Volume-3, Issue-1, October 2013
Microcontroller Based Direct Digital Synthesizer
and FSK Modulator
Mahesh Bilagi, Manjunath Lakkannavar
Abstract- Many possibilities for frequency generation are II. SYSTEM BLOCK DIAGRAM
open to a designer, ranging from phase-locked-loop (PLL)-
based techniques or very high-frequency synthesis, to dynamic 2.1 MICROCONTROLLER AT89C52:
programming of digital- analog converter (DAC) outputs to An 8-bit microcontroller with 8 Kilo bytes flash which
generate arbitrary waveforms at lower frequencies. But DDS’s provides the highly flexible and cost effective solution to
ability to accurately produce and control waveforms of various
frequencies and profiles has become a key requirement
many embedded control application. It is here used to
common to a number of industries. Whether providing lively accept the frequency from the keyboard, process it and
sources of low phase-noise variable-frequencies with good present a 32-bit HEX value to the DDS. This is achieved
spurious performance for communications, or simply through software programming.
generating a frequency stimulus in industrial or biomedical test
equipment applications, convenience, compactness and low cost 2.2 DDS MODULATOR AD7008
are important design considerations. The AD7008 direct digital synthesis chip is a
numerically controlled oscillator employed a 32-bit phase
Keywords: - DDS and Digital to analog converter. accumulator, sine and cosine look-up tabled and a 10- bit
D/A converter integrated on a single CMOS chip. The n bit
I. INTRODUCTION value loaded to the AD7008 internally generates the
Theoretical analysis of DDS technology gave an overview frequency using the below given formula:
of the functioning of DDS; especially with respect to f= (∆phase*fCLOCK)/2^n, where 0 < phase < 2^32
functionality and performance shift key generator After internal processing the chip produces the output
developed using this technology embodies the power, which is presented to the external environment through the
flexibility and depth that this technology has to offer. pin I out. This output waveform can be observed on the
Nowadays the DDS technique is rapidly gaining CRO by connecting the Iout pin to one of the channels of
acceptance for solving frequency (or waveform) the CRO.
generation requirements in both communications and 2.3 KEYBOARD
industrial applications because single-chip IC devices can
generate programmable analog output waveforms simply It is used in the design to input the frequency. The „key
and with high resolution and accuracy. press‟ generates an interrupt to the processor (INT0),
Modern communications systems especially spread which initiates the rest of the process and finally produces
spectrum systems, are placing increasing demands on the the output corresponding to the input frequency.
resolution and bandwidth requirement of frequency 2.4 LCD
synthesizer subsystem in order to gain analog improved LCD functions as a guide to the user, instructing the user
performance. Today‟s spread spectrum applications to perform necessary actions by displaying the instructions
require a frequency synthesizer that is capable of tunings on the LCD.
to different output frequencies with extremely fine 2.5 FUNCTIONAL DESCRIPTION
frequency resolution with the switching speed of the order The system consists of two main components, the
of nanoseconds. The resolution requirements of many microcontroller AT89C52 and the DDS AD7008. The
systems are so severe that they are surpassing the programmable peripheral interface, 82C55 is used to
performance capabilities of conventional analog phase interface the microcontroller and the DDS chip. A
locked loop. Although limited by Nyquist criteria, DDS keyboard and LCD display are interfaced to the
allows frequency resolution control on the order of milli- microcontroller to provide the user inputs and guide the
hertz or even nano-hertz of phase resolution control. The user respectively.
increasing availability of high speed DACs makes a direct The system is reset on „power on‟. The user is guided to
digital approach to frequency synthesis and enticing choose either of two modes of operations i.e., as a direct
alternative to conventional synthesizer. digital synthesizer or as a FSK modulator.
Mode 1: Direct digital synthesizer
The user is instructed to enter the required frequency on
the keyboard. Each key press generates an interrupt to the
microcontroller and the data is read into the
microcontroller as explained in the keyboard operation.
Once the user gives the input, the microcontroller
Manuscript received October, 2013. generates the 32 bit value to be loaded into the frequency 0
Mahesh Bilagi, VLSI And Embedded System VTU Extension register of DDS. This 32 bit value is now loaded into
Center,UTL Technologies Ltd Bangalore., India. AD7008 through the programmable peripheral interface
Manjunath Lakkannavar, Lecturer, VTU Extension Center UTL
Technologies Ltd, Bangalore-22, India. 82C55 in two cycles. The command register of AD7008 is
217
Microcontroller Based Direct Digital Synthesizer and FSK Modulator
chosen and configured for 16bit data bus mode. Now, independently and asynchronously from the DDS clock;
frequency 0 register is selected by writing 0x08 in TC the transfer control signals are internally synchronized to
register. prevent metastability problems. The synchronizer can be
The higher word of the 32bit data is first presented and bypassed to reduce the transfer latency in the event that the
the write pulse is given, at the falling edge of the write microprocessor clock is synchronous with the DDS clock.
pulse the data is latched into the register. The lower word A power-down pin allows external control of a power-
is then presented; simultaneously the TC register also downmode (also accessible through the microprocessor
loaded for frequency 0 register selections. The write pulse interface) The AD7008 is available in 44-pin PLCC.
is given and at the falling edge of the write pulse, the entire
32 bit value is made available on the 32 bit parallel shift
register of AD7008. at some time after the second falling
edge of write pulse, the LOAD signal may go high.
The sine wave is now available at the IOUT pin of
AD7008. Any frequency ranging 0-50MHZ can be
realized using this setup successfully. To reduce the noise
and distortions at higher frequencies active filters (using
AD8031) can be implemented.
Mode 2: FSK Generator
FSK Generation requires that the user inputs 2 different
frequencies to modulate the bits 0 and1. The user inputs
the first frequency, say frequency 0 for bit 0 in a similar
fashion as explained above. To enter the next frequency,
the user needs to enter the mode selection button. Once
this key is pressed, AD7008 is now configured for data to III. CIRCUIT DESCRIPTION
be entered into frequency 1 register. The timing diagram The AD7008 provides an exciting new level of
details remain the same but the TC register is now loaded integration for the RF/Communications system designer.
with 0x09 instead. To generate the message signal for FSK The AD7008 combines the numerically controlled
We use a clock circuit using 555 timer with a frequency of oscillator (NCO), SINE/COSINE look-up tables,
15Hz. frequency, phase and IQ modulators, and a digital-to-
In the above two modes of operation the data can also be analog converter on a single integrated circuit.
loaded into the 32 bit register from SRAM and FLASH The internal circuitry of the AD7008 consists of four
memories by writing exhaustive LUTs for certain main sections. These are:
frequency ranges into the memories. 1. Numerically Controlled Oscillator (NCO) + Phase
For successful implementation of the above, we need Modulator
certain support circuitry. 2. SINE and COSINE Look-Up Tables
A latch separates the data and address lines from the 3. In Phase and Quadrature Modulators
microcontroller with ALE signal. That apart, we also have 4. Digital-to-Analog Converter
bidirectional buffer that provides the extra current drive The AD7008 is a fully integrated Direct Digital
during read and write operations and sets the direction for synthesis (DDS) chip. The chip requires one reference
read and write operations using NAND logic. We also clock, two low precision resistors and six decoupling
have decoder for the addressing the devices as and when capacitors to provide digitally created sine waves up to 25
required. A more sophisticated 32-bit keyboard can also be MHz In addition to the generation of this RF signal, the
interfaced with the system, for which communication can chip is fully capable of a broad range of simple and
be provided by RS232 and MAX232 provisions made on complex modulation schemes. These modulation schemes
the board. are fully implemented in the digital domain allowing
The power supply considerations are taken care of by accurate and simple realization of complex modulation
the voltage regulators. LM7912 and LM7905 provide 12V algorithms using DSP techniques.
and 5V, respectively for the various chips as required. Numerically Controlled Oscillator + Phase Modulator
This consists of two frequency select registers, a phase
2.6 PRODUCT DESCRIPTION accumulator and a phase offset register. The main
The AD7008 direct digital synthesis chip is a component of the NCO is a 32-bit phase accumulator
numerically controlled oscillator employing a 32-bit phase which assembles the phase component of the output signal.
accumulator, sine and cosine look-up tables and a 10-bit Continuous time signals have a phase range 0 to 2π.
D/A converter integrated on a single CMOS chip. Outside this range of numbers, the sinusoidal functions
Modulation capabilities are provided for phase modulation, repeat themselves in a periodic manner. The digital
frequency modulation. In-phase and quadrature amplitude implementation is no different. The accumulator simply
modulation techniques are suitable for QAM and SSB scales the range of phase numbers into a multi bit digital
generation. word. The phase accumulator in the AD7008 is
Clock rates up to 20 MHz and 50 MHz are supported. implemented with 32bits. Therefore in the AD7008, 2 π =
Frequency accuracy can be controlled to one part in 4 232. Likewise, the Phase term is scaled into this range of
billion. Modulation may be effected by loading registers numbers 0 ≤Phase ≤ 232 – 1.Making these substitutions
either through the parallel microprocessor interface or the into the equation above:
serial interface. A frequency-select pin permits selection f=≤phase x fCLOCK/2^32 where 0<phase<2^32
between two frequencies on a per cycle basis. With a clock signal of 50MHz and a phase word of
The serial and parallel interfaces may be operated 051EB852 hex:
218
International Journal of Engineering and Advanced Technology (IJEAT)
ISSN: 2249 – 8958, Volume-3, Issue-1, October 2013
F=51EB852 x 50MHz/2^32=1.000000000931MHz
The input to the phase accumulator (i.e., the phase step)
can be selected either from the FREQ0 Register or FREQ1
Register, and this is controlled by the FSELECT pin. The
phase accumulator in the AD7008 inherently generates a
continuous 32-bit phase signal, thus avoiding any output
discontinuity when switching between frequencies. This
facilitates complex frequency modulation schemes, such as
GMSK.
Following the NCO, a phase offset can be added to
perform phase modulation using the 12-bit PHASE
Register. The contents of this register are added to the
most significant bits of the NCO.
Sine and Cosine Look-Up Tables
To make the output useful, the signal must be converted
from phase information into a sinusoidal value. Since
phase information maps directly into amplitude, a ROM
look up table converts the phase information into
amplitude. To do this the digital phase information is used
to address a Sine/Cosine ROM LUT. Only the most
significant 12bits are used for this purpose. The remaining
20 bits provide frequency resolution an minimize the
effects of quantization of the phase to amplitude
conversion.
Digital-to-Analog Converter
The AD7008 includes a high impedance current source
10-bit DAC, capable of driving a wide range of The above snap shot shows the output of the system as
loads at different speeds. Full-scale output current can be frequency synthesizer. The frequency entered through the
adjusted, for optimum power and external load keyboard is displayed on CRO.
requirements, through the use of a single external resistor Now, the mode of the system is changed by pressing the
(RSET). “MODE” button on the keyboard. The system functions as
The DAC can be configured for single or differential- FSK generator. This allows the user to enter a second
ended operation. IOUT can be tied directly to AGND for frequency.
single-ended operation or through a load resistor to
develop an output voltage. The load resistor can be any V. CONCLUSION
value required as long as the full-scale voltage developed
A microcontroller based direct digital frequency
across it does not exceed 1 volt. Since full-scale current is
synthesizer and FSK generator has been successfully
controlled by RSET, adjustments to RSET can balance
designed tests and implemented. The DIRECT DIGITAL
changes made to the load resistor.
TECHNOLOGY has been successfully utilized using
microcontroller to develop a highly accurate and precise
system which provides a good operating frequency range.
The correctness and liability of the subsystem have been
scrutinized during the development stages. The overall
system has been verified by producing frequencies with a
high degree of accuracy and precision.
The AD7008 has three registers that can be used for DDS based function generator are just beginning to appear
modulation. Besides the example of frequency modulation in the market. These function generators offer substantial
shown above, the frequency registers can be updated performance improvements, at reduced costs, over
dynamically as can the phase register and the IQMOD conventional analog function generators. As the costs of
register. These can be modulated at rates up to 16.5 MHz. ASIC‟s RAM‟s and DAC‟s decline, while their speed and
The example shown below along with code fragment resolution increased, expect to see DDS based function
shows how to implement the AD7008 in an amplitude generators soon replace their analog counterparts.
modulation scheme. Other modulation schemes can be
implemented in a similar fashion. REFERENCES
[1] J. Tierney et al., “A digital frequency Synthesizer,” IEEE Trans
IV. RESULT Audio Electro acoustics. Vol. AU-19, pp.48-57, 1971.
[2] Gutierrez-Aitken, et al., “Ultrahigh-Speed Direct Digital
Synthesizer Using InP DHBT Technology”, IEEE J. Solid-State
Circuits, vol. 37, No.9, pp.1115–1119, Sept. 2002.
[3] S. Mortezapour and E. K. F. Lee, "Design of Low-Power ROM-
Less Direct Digital Frequency Synthesizer Using Nonlinear
Digital-to-Analog Converter,“ IEEE J. Solid-State Circuits,
vo1.34, no.10, pp. 1350-1359, 1999.
[4] Dayu Yang and Foster F. Dai, “A 10GHz Nonlinear Cosine-
Weighted DAC in High- Speed DDS”, IEEE 5th Topical Meeting
on Silicon Monolithic Integrated Circuits in RF Systems, Atlanta,
219
Microcontroller Based Direct Digital Synthesizer and FSK Modulator
GA, September, 2004.
[5] Malinky Ghosh, Lakshmi S. J. Chimakurthy, F.Foster Dai, and
Richard C. Jaeger, “A novel DDS architecture using nonlinear
ROM addressing with improved compression ratio and
quantization noise IEEE International Symposium on Circuits and
Systems (ISCAS), pp.705-7 Vancouver,Canada, May 2004.
[6] Yongchul Song, Beomsup Kim, “A 14-b Direct Digital Frequency
Synthesizer with Sigma Delta Noise Shaping”, IEEE J Solid State
Circuits, vol 39, pp 847- 851, May 2004.
[7] B. H. Hutchison, Jr., Frequency synthesis and applications, New
York: IEEE Press, 1975.
[8] F. Curticapean and J. Niittylahti, “Low-power direct digital
frequency synthesizer,” Proc. IEEE 43rd Midwest symposium on
Circuits and Systems, 2000, on CD-ROM.
[9] Gutierrez-Aitken, et al., “Ultrahigh-Speed Direct Digital
Synthesizer Using InP DHBT Technology”, IEEE J. Solid-State
Circuits, vol. 37, No.9,pp.1115–1119, Sept. 2002
[10] F. Curticapean and J. Niittylahti, “Low-power direct digital
frequency synthesizer,” Proc. IEEE 43rd Midwest symposium on
Circuits and Systems, 2000, on CD-ROM
220