摘 要
本設計是波形發生器的設計,以 51單片機為核心,通過按鍵輸入控制輸出信號的類型、頻率,采用 D/A轉換芯片DAC0832輸出相應的波形,同時以LED 顯示器進行實時顯示信號相關信息。我們采用 C 語言進行編程,可實現方波,鋸齒波,三角波,三種波形的產生,且波形的類型、頻率可通過按鍵調節,并頻率顯示在數碼管上。
關鍵字:單片機、D/A轉換芯片DAC0832
Abstract
This design is the design of waveform generator, using 51 single chip microcomputer as the core, through the key input type, frequency control output signal, using D/A conversion chip DAC0832 the corresponding output waveform, simultaneously by LED display to display information related to real time signal. We use C language to program, can achieve a square wave, sawtooth wave, triangle wave, three kinds of waveform generation, type, frequency and waveform can be adjusted via buttons, and frequency in the digital tube display.
Key word: Microcontroller, D/A conversion chip DAC0832
keyport=ZLG7290_GetKey();
switch(keyport)
{
case 1:num=1;break;
case 2:num=2;break;
case 3:num=3;break;
case 4:zk=1;break;
case 5:zk=2;break;
case 6:zk=3;break;
}