【正文】
F,0xFF,0xFF }。 Fx=1/(2π)即:Lx=1/( 4π*π*Fx*Fx)Lx=[38*(1e+6)]/ 電感測量電路 多路選擇開關(guān)電路利用CD4052實現(xiàn)測量類別的轉(zhuǎn)換,CD4052是雙4選一的模擬開關(guān)選擇器件。 R1=100K歐姆: CH設(shè)置為高電平輸出;R5=R6;Cx =(*(1e+6))/ fx。被測電阻被測電容被測電感電容三點式震蕩電路分頻電路 RC震蕩電路RC震蕩電路 多路選擇開關(guān)CD4052二極管 指示數(shù)字 顯示語音 播報按鍵選擇測量電路 AT89S52Addr測量頻率FrFcFl量程切換量程切換 RLC測量儀電路方框圖 各部分電路設(shè)計 電阻測量電路 電阻的測量采用“脈沖計數(shù)法”,通過計算振蕩輸出的頻率來計算被測電阻的大小。1 硬件電路 設(shè)計要求設(shè)計并制作一臺數(shù)字顯示的電阻、電容和電感參數(shù)測試儀,具體要求數(shù)據(jù)如下:(1)測量范圍:電阻100~1M;電容100PF~10000PF;電感100UH~10mH。AT89S52。本課題主要研究內(nèi)容為設(shè)計一個基于單片機的RLC智能測量儀器,能夠智能地識別出待測元件是電容、電感還是電阻;能精確測量出電阻、電容、電感的參數(shù)值,同時還能加入語音播報的功能;可以實現(xiàn)量程電阻的自動轉(zhuǎn)換,無須人工選擇檔位;對測量儀進行擴充后還實現(xiàn)了二極管、三極管的測量。軟件開發(fā)桂林電子科技大學(xué)畢業(yè)設(shè)計(論文)報告用紙摘 要在使用電子元器件時,首先需要了解參數(shù)。理論研究 168。實驗研究 254。采用傳統(tǒng)的儀表進行測量時,首先要從電路板上焊開器件,再根據(jù)元件的類型,手動選擇量程擋位進行測量,這樣不僅麻煩而且破壞了電路板的美觀。關(guān)鍵詞:RLC測量儀;AT89S52;NE555 AbstractIn the use of electronic ponents, the first need to understand the traditional instrument to measure, the first circuit board from a welding device, according to the type of ponents, manually select range Shift to measure, this is not only troublesome but also undermine The appearance of the circuit board. Based on SCM control to achieve the RLCmeasuring instrument can measure, intelligent identification, range automatic conversion, and other features, thereby greatly increasing the meter measuring speed and accuracy, expanded the range. So this RLC measuring instrument can improve the performance measurement system, and maintain the appearance of the printed circuit, the more traditional measuring instrument also is highly intelligent and functional instrument of integration and application in the future will have broad prospects. The main topics for the design of research has been based on the RLC SCM smart measuring instruments, smart and able to identify ponents under test is capacitors, inductors or resistance。NE555目 錄引言 11 硬件電路 2 設(shè)計要求 2 電路方框圖及說明 2 各部分電路設(shè)計 2 電阻測量電路 2 電容測量電路 3 電感測量電路 4 多路選擇開關(guān)電路 5 按鍵及顯示電路 5 單片機模塊 6 量程選擇模塊 7 電源模塊 82 軟件部分 8 主程序流程圖 8 程序清單 93 相關(guān)元器件 19 元件清單 19 AT89S52資料 20 ICM7218資料 31 74LS390資料 32 CD4052資料 33 NE555資料 33 共陽4位LED數(shù)碼管資料 40 三極管相關(guān)資料 41 三端穩(wěn)壓管LM7805資料 42 繼電器資料 434 調(diào)試總結(jié) 435 結(jié)論 44謝 辭 45參考文獻 46附 錄 47 桂林電子科技大學(xué)畢業(yè)設(shè)計(論文)報告用紙 第 48 頁 共 47 頁引言測量電子元器件集中參數(shù)R、C、L的儀表種類較多,方法也各有不同,但都有其優(yōu)缺點。(2)測量精度:5%;制作4位數(shù)碼管顯示器,顯示測量數(shù)值,并用發(fā)光二極管分別知識所測元件的類型和單位。555接成多諧振蕩器的形式,其振蕩周期為:T=t1+t2=(ln2)(R1+Rx)*C1+(ln2)Rx*C1得到:Fx=1/[(ln2)(R2+2Rx)C1]即:Rx=[1/(ln2)C1R1]/2電路分為2檔: RH設(shè)置為高電平輸出,RL設(shè)為低電平輸出; 100≤Rx1000歐姆: R3=200歐姆;C14=;Rx=(*(1e+6))/(2*fx)330/2 對應(yīng)的頻率范圍為:≤fx 16K 1000≤Rx1M歐姆:R2=20k歐姆;C1=103PF; Rx =(*(1e+8))/(2*fx)(1e+4)對應(yīng)的頻率范圍為:141Hz≤fx 電阻測量電路 電容測量電路 電容的測量同樣采用“脈沖計數(shù)法”,通過計算振蕩輸出的頻率來計算被測電容的大小。 對應(yīng)的頻率范圍為:480Hz≤fx 。當(dāng)選擇了某一通道的頻率后,輸出頻率通過通過P35作為CPU定時器的時鐘源并開始計數(shù),當(dāng)計數(shù)到3秒后讀出計數(shù)器的值,除以3就得到了被測R/C/L所對應(yīng)產(chǎn)生的頻率,通過計算得到要被測值。//語音播放結(jié)果列表 unsigned char SaveData[8] ={ 0xCE,0xCE,0xCE,0xCE,0xCE,0xCE,0xCE,0xCE }。//7218A工作模式sbit R_select = P3^2。//電阻指示燈sbit C_led = P2^1。//電容量程轉(zhuǎn)變sbit F_B = P1^4。//ISD1420反饋信號]/**************************** 延時******************************/void delay(unsigned int k){ unsigned int a。}/****************************** 頻率測量*******************************/void pl(void){ TMOD = 0x51。 TL1 = 0。 TR0 = 1。 pinlv= (counter * 65536 + TH1 * 256 + TL1) / 3。}void t0(void) interrupt 1 using 0//定時器中斷子程序{ TH0 = 0x3c。}/****************************** 阻值公式換算(單位:歐姆)*******************************/void R_deal(void){ result = (6557705 / pinlv 200) / 2。 result 400000)//修正 { result = result * 939 / 1000。 } if (result 277)//修正 { result = result * 36 / 100。 } if (result = 288 amp。amp。 result 470) { result = result * 65 / 100。 } if (result = 3295 amp。//頻率分頻還原 result = (6069931 / pinlv) * (6069931 / pinlv)。 result 3600) { result = result * 100 / 65。 } if (result = 552 amp。amp。 result 465) { result = result * 1000 / 765。 while (flag / 10) { flag = flag / 10。 for (j=0。 shi = result / 10 % 10。 SaveData[2] = Tab[ge]。//寫命令字 ICM7218 = 0xf0。 i++) { ICM7218 = SaveData[i]。 P_tab[2] = Addr[ge]。 if (R_led == 0)//電阻歐 { P_tab[6] = Addr[12]。 i7。//播放 delay(20000)。 }}/***************************** 主函數(shù)******************************/void main(void){ R_select = 1。 C_led = 1。 while (1) {/*****************電阻*********************/ if (R_select ==0 )//測電阻 { delay(2000)。 F_B = 0。 R_change = 1。//測頻 if (pinlv 164)//是否需要轉(zhuǎn)換(高量程)? { R_change = 0。 } R_deal()。//語音播放 }}/******************電容***********************/ if (C_select == 0)//測電容 { delay(2000)。 F_B = 0。//低量程 R_change = 1。//測頻 if (pinlv 13383)//是否需要轉(zhuǎn)換(高量程)? { C_change=0。 } C_deal()。//語音播放 }}/******************電感***********************/ if (L_select==0)//測電感 { delay(2000)。 C_change = 1。 delay(20000)。//代碼轉(zhuǎn)換 display()。最早的設(shè)計理念是通過將大量外圍設(shè)備和CPU集成在一個芯片中,使計算機系統(tǒng)更小,更容易集成進復(fù)雜的而對提及要求嚴(yán)格的控制設(shè)備當(dāng)中。此后在8031上發(fā)展出了MCS51系列單片機系統(tǒng)。隨著INTEL i960系列特別是后來的ARM系列的廣泛應(yīng)用,32位單片機迅速取代16位單片機的高端地位,并且進入主流市場。而在作為掌上電腦和手機核心處理的高端單片機甚至可以直接使用專用的Windows和Linux操作系統(tǒng)。手機、電話、計算器、家用電器、電子玩具、掌上電腦以及鼠標(biāo)等電腦配件中都配有12部單片機。AT89S52主要性能*與MCS51單片機產(chǎn)品兼容。*三級加密程序存儲器。*全雙工UART串行通道。*雙數(shù)據(jù)指針。片上Flash允許程序存儲器在系統(tǒng)可編程,亦適于常規(guī)編程器??臻e模式下,CPU停止工作,允許RAM、定時器/計數(shù)器、串口、中斷繼續(xù)工作。P0口P0 口是