【正文】
五、一步一步的自動化,定義:最高值,最低值,一步一步的速度, 一步一步的計算,按升序或下降,循環(huán)或不循環(huán)。 然后 8位數據被加載在 WCLK上升沿,將指針設置到下一個輸入注冊。數字到模擬轉換電路,如圖 2所示 : 圖 2 DAC 電路 PWM轉換 DA電路 低通濾波器的 PWM信號從 STM32到穩(wěn)定使用電壓跟隨器,然后穩(wěn)定將產生一個穩(wěn)定的輸出電壓,通過調整 PWM占空比可調節(jié)電壓。 合成所需的頻率信號,它需要完成以下步驟: (頻率控制字 K),輸出 2 pi累計相位(使用相位累加器)。另一方面,可以任意波形通過開展數字頻率結合使用的微控制器單元( MCU)和 DA轉換實現。 (b) 1 MHz wave form output。Design of Digital Controlled Signal Generator Based on DDS and MCU Yinjun Chena, Zehuai Yuan Faculty of Electronic Information and Mechanical Electrical Engineering, Zhaoqing University, Zhaoqing 526061, China Keywords: DDS。 (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%。實驗和應用測試表明,數控信號源所組成的 STM32微控制器和 DDS芯片可以很好地工作。 2 pi積累階段,使用 ROM來存儲相應的相位幅度的一般正弦函數形式。該系統(tǒng)輸出的 3個 PWM信號,它分別控制 AD9850的輸出范圍,占空比和輸出 DAC0832 的范圍。 WCLK上升沿重復 5次后,在 WCLK上升沿將不再工作,直到復位信號或地址指針復位到第一個輸入寄存器的 FQUD上升沿。 數控改革信號源的優(yōu)勢 設計的數值的控制信號源被施加到車床改革實驗。 四、觸摸屏的操作包括虛擬鍵盤,滑條和各種虛擬控制進行輸入操作,每一個參數都可以 直觀演示。 重復 5次后,在 40位的數據被加載到頻率 /相位數據寄存器(用于刷新的 DDS輸出頻率和相位),同時,上面的 FQUD上升沿地址指針復位到第一個輸入寄存器。一步一步的調節(jié)相量,可以創(chuàng)建任意的頻率, PWM信號通過低通濾波器從 STM32傳輸到相應的電壓,因此,DAC0832的參考電壓是被控制的,而且,輸出的波形幅度調節(jié)適當。在波形里的每個采樣點對應一個相位點 的相位周期。如果需要進入任何波形,它可能會真正的由 FPGA采用 DDS的 IP核或硬件描述語言等方式來實現,然而 , 這種方式成本費用高 。 (b) filtering circuit Amplification and wave filtering circuit The amplification circuit will export amplified wave form and modify the factor of amplification. An excellent smooth output waveform can be achieved by using the lowpass active power filtering. The amplification circuit and the filtering circuit is showed in Fig. 4. Software design And the system software mainly include AD9850 driving module, DAC0832 driving module, the stepbystep automation module, PWMconvertingDA module and uC/GUI figure supporting system implanted in procedure. The operation interface is full of humanization for the multiwindow pattern is adopted. The design 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