摘 要
本设计是波形发生器的设计,以 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;
}