【文章內(nèi)容簡(jiǎn)介】
nal source has used the uC/GUI software sufficiently to establish many windows and control buttons. By means of invoking the corresponding windows and control with the feedback information, the peripheral equipment operated under the control of the system. The external equipment is mainly separated into two drivers, the drive being an AD9850 module and DAC0832 module drive, respectively. The two modules can be controlled by means of the outside interruption and timing interruption. AD9850 Drive AD9850 has 40 control words, among them, 32bit is used for frequency control, 5bit is used for the phase control, 1bit is used for the power source dormancy control, 2bit is used to choose operation pattern.Fig. 5 Systematic procedure flow chartThis 40 control words may arrive at AD9850 by concurrence way or serial way, in the concurrence way, 8 data highway generals can transfer the data to a register. After repeating 5 times, the 40bit data is loaded into the frequency / phase data register (for refreshing DDS output frequency and phase) at the FQUD rising edge, meanwhile, the address pointer is reset to the first input registerThen the 8bit data is loaded at the WCLK rising edge, and the pointer is set to the next input register. After repeating 5 times of WCLK rising edge, the WCLK rising edge will work no longer until the reset signal es or the address pointer is reset to the first input register by the FQUD rising edge. The procedure operate AD9850 module through the bottom function, as void ad9850( double frequency, //frequency unsigned char phase, //phase unsigned char mode, //pattern unsigned char power //source ) The DAC0832 driven module In the design of the numerical control signal source, DAC0832 is defined as single bufferedpattern, when the 8 bit Parallel data D0~D7 is input, the DA will transfer data in the CS. The bottom function of void DA0832(u8 value)can invoke Out_To_DDS0832(doubleFrequency,u8 type) function and control the defined wave form and frequency. This function is based on figure frequency poses principle, it transfers the input frequency into corresponding control word, and then bing phase stepbystep expect, output wave form data sheet in memory. The extent and dutyfactor can be tuned through invoking Adjust_Vpp() and Adjust Duty() Stepbystep automation procedure A stepbystep automation procedure brick is added to the design to define the frequency range, stepbystep rate , stepbystep amounts , ascending or lapse, cycling pattern. The stepbystep automation function can be realized through invoking Auto Step(AutoStepStr*AS) and passing memory structure type to a function.Test the experiment and data analysisThe DDS numerical control signal source can import the various changeable control words by a touching screen, and then accurately control the signal frequency, dutyfactor, extent and phase. Figure 6 shows the corresponding experimental wave forms.Fig. 6 The oscillograph exports experiment picture (a) 1 KHz wave form output。 (b) 1 MHz wave form output。 (c) 20 MHz wave form output.With the oscillograph testing, it shows that the circuit work stably and rightly. The various parametric index exhibit fine numerical control effect. a. Output frequency range: 1Hz—30MHz,peaktopeak value: 50mV~10V;dutyfactor: 10%~100%, difference≤1%。 b. Export the sine wave, sawtooth wave rectangular wave, triangle wave and arbitrarily wave form. c. Continuou