【正文】
gn process of the system software is shown in Fig. 5. Implanted uC/GUI The numerical control signal 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 chart This 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 register Then 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 buffered pattern, 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(double Frequency,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 analysis The 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。 MCU可以產(chǎn)生所需的任意波形,但其程序執(zhí)行的順序限制速度。如果需要進入任何波形,它可能會真正的由 FPGA采用 DDS的 IP核或硬件描述語言等方式來實現(xiàn),然而 , 這種方式成本費用高 。因此, DDS系統(tǒng)輸出一個正弦波的正弦查詢表時,完成一個周期。在波形里的每個采樣點對應(yīng)一個相位點 的相位周期。該系統(tǒng)的設(shè)計的框圖如圖 1所示。一步一步的調(diào)節(jié)相量,可以創(chuàng)建任意的頻率, PWM信號通過低通濾波器從 STM32傳輸?shù)较鄳?yīng)的電壓,因此,DAC0832的參考電壓是被控制的,而且,輸出的波形幅度調(diào)節(jié)適當(dāng)。由于采用多窗口的圖案使得操作界面充滿人性化。 重復(fù) 5次后,在 40位的數(shù)據(jù)被加載到頻率 /相位數(shù)據(jù)寄存器(用于刷新的 DDS輸出頻率和相位),同時,上面的 FQUD上升沿地址指針復(fù)位到第一個輸入寄存器。 測試實驗和數(shù)據(jù)分析 DDS數(shù)字控制信號源能夠通過觸摸屏導(dǎo)入各種多變的控制字,然后準(zhǔn)確地控制信號的頻率,占空比,范圍和相位。 四、觸摸屏的操作包括虛擬鍵盤,滑條和各種虛擬控制進行輸入操作,每一個參數(shù)都可以 直觀演示。 參考文獻 [1] Lygouras J. N., Tarchanidis K. N., Tsalides Ph.