1. 程式人生 > 實用技巧 >507【畢設課設】基於51微控制器的訊號發生器系統模擬電路

507【畢設課設】基於51微控制器的訊號發生器系統模擬電路

本設計採用AT89C51微控制器作為控制核心,外圍採用數字/模擬轉換電路(DAC0832)、運放電路(LM324)、按鍵和LCD液晶顯示電路。電路採用微控制器和一片DAC0832數模轉換器組成數字式低頻訊號發生器,可產生正弦波、矩形波、鋸齒波和三角波四種波形。系統通過微控制器產生數字訊號,通過DAC0832轉換為模擬訊號,再通過放大器LM324就可以得到雙極性的各種波形,最終由示波器顯示出來。通過鍵盤來控制四種波形的型別選擇、頻率變化,並通過液晶1602顯示其各自的波形型別以及頻率數值。

本設計硬體電路簡單,軟體功能完善,控制系統可靠,價效比較高,具有一定的實用價值和參考價值。

【資源下載】下載地址如下:

https://docs.qq.com/doc/DTlRSd01BZXNpRUxl

sbit K4=P2^3;
sbit K5=P2^4;

uchar WaveChoice=1;
uchar ys=30;
uchar i,a=0;
uchar sqar_num=128;
uint freq;

uchar code Sin[]={"Sine      "};
//uchar code exp[]={"Exp      "};
uchar code Squ[]={"Square    "} ;
uchar code Tri[]={"Triangle  "};
uchar code Saw[]={"Sawtooth  "} ;
uchar code No[]={"No Signal out "};
uchar code Wave[]={"Wave :"}; 
uchar code Fre[]={"Freq :"};

uchar code tosin[256]=
{0x80,0x83,0x86,0x89,0x8d,0x90,0x93,0x96,0x99,0x9c,0x9f,0xa2,0xa5,0xa8,0xab,
0xae,0xb1,0xb4,0xb7,0xba,0xbc,0xbf,0xc2,0xc5,0xc7,0xca,0xcc,0xcf,0xd1,0xd4,0xd6,0xd8,
0xda,0xdd,0xdf,0xe1,0xe3,0xe5,0xe7,0xe9,0xea,0xec,0xee,0xef,0xf1,0xf2,0xf4,
0xf5,0xf6,0xf7,0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfd,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,
0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xfd,0xfd,0xfc,0xfb,0xfa,0xf9,