匠人介紹一些設計時比較常用方法給大家。我們可以借助這些方法來對程序進行更高 效、更多維的規(guī)劃。
上傳時間: 2013-10-19
上傳用戶:hopy
TLC2543是TI公司的12位串行模數(shù)轉換器,使用開關電容逐次逼近技術完成A/D轉換過程。由于是串行輸入結構,能夠節(jié)省51系列單片機I/O資源;且價格適中,分辨率較高,因此在儀器儀表中有較為廣泛的應用。 TLC2543的特點 (1)12位分辯率A/D轉換器; (2)在工作溫度范圍內(nèi)10μs轉換時間; (3)11個模擬輸入通道; (4)3路內(nèi)置自測試方式; (5)采樣率為66kbps; (6)線性誤差±1LSBmax; (7)有轉換結束輸出EOC; (8)具有單、雙極性輸出; (9)可編程的MSB或LSB前導; (10)可編程輸出數(shù)據(jù)長度。 TLC2543的引腳排列及說明 TLC2543有兩種封裝形式:DB、DW或N封裝以及FN封裝,這兩種封裝的引腳排列如圖1,引腳說明見表1 TLC2543電路圖和程序欣賞 #include<reg52.h> #include<intrins.h> #define uchar unsigned char #define uint unsigned int sbit clock=P1^0; sbit d_in=P1^1; sbit d_out=P1^2; sbit _cs=P1^3; uchar a1,b1,c1,d1; float sum,sum1; double sum_final1; double sum_final; uchar duan[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,0x07,0x7f,0x6f}; uchar wei[]={0xf7,0xfb,0xfd,0xfe}; void delay(unsigned char b) //50us { unsigned char a; for(;b>0;b--) for(a=22;a>0;a--); } void display(uchar a,uchar b,uchar c,uchar d) { P0=duan[a]|0x80; P2=wei[0]; delay(5); P2=0xff; P0=duan[b]; P2=wei[1]; delay(5); P2=0xff; P0=duan[c]; P2=wei[2]; delay(5); P2=0xff; P0=duan[d]; P2=wei[3]; delay(5); P2=0xff; } uint read(uchar port) { uchar i,al=0,ah=0; unsigned long ad; clock=0; _cs=0; port<<=4; for(i=0;i<4;i++) { d_in=port&0x80; clock=1; clock=0; port<<=1; } d_in=0; for(i=0;i<8;i++) { clock=1; clock=0; } _cs=1; delay(5); _cs=0; for(i=0;i<4;i++) { clock=1; ah<<=1; if(d_out)ah|=0x01; clock=0; } for(i=0;i<8;i++) { clock=1; al<<=1; if(d_out) al|=0x01; clock=0; } _cs=1; ad=(uint)ah; ad<<=8; ad|=al; return(ad); } void main() { uchar j; sum=0;sum1=0; sum_final=0; sum_final1=0; while(1) { for(j=0;j<128;j++) { sum1+=read(1); display(a1,b1,c1,d1); } sum=sum1/128; sum1=0; sum_final1=(sum/4095)*5; sum_final=sum_final1*1000; a1=(int)sum_final/1000; b1=(int)sum_final%1000/100; c1=(int)sum_final%1000%100/10; d1=(int)sum_final%10; display(a1,b1,c1,d1); } }
上傳時間: 2013-11-19
上傳用戶:shen1230
HT45F23 MCU 為用戶提供兩組獨立的比較器,並都由軟體控制,輸入輸出口安排靈活,均 與I/O 共用引腳。本文著重介紹HT45F23 比較器的功能使用的相關設定與應用方式。
標簽: Comparator 45F F23 HT
上傳時間: 2013-10-16
上傳用戶:songkun
HT45F23 MCU 含有兩個運算放大器,OPA1 和OPA2,可用於用戶特定的模擬信號處理,通 過控制暫存器,OPA 相關的應用可以很容易實現(xiàn)。本文主要介紹OPA 的操作,暫存器設定 以及基本OPA 應用,例如:同相放大器、反相放大器和電壓跟隨器。 HT45F23 運算放大器OPA1/OPA2 具有多個開關,輸入路徑可選以及多種參考電壓選擇,此 外OPA2 內(nèi)部有8 種增益選項,直接通過軟體設定。適應於各種廣泛的應用。
上傳時間: 2013-11-21
上傳用戶:immanuel2006
在理論分析循環(huán)碼編碼和譯碼基本原理的基礎上,提出了基于單片機系統(tǒng)的(24,16)循環(huán)碼軟件實現(xiàn)編碼、譯碼的方案。仿真結果表明(24,16)循環(huán)碼能有效地克服來自通訊信道的干擾,保證數(shù)據(jù)通信的可靠及系統(tǒng)的穩(wěn)定,使誤碼率大幅度降低。本論文對(24,16)循環(huán)碼的研究結果表明,可以有效地降低錯誤概率和提高系統(tǒng)的吞吐量,實現(xiàn)糾錯僅需要在接收端增加有限的存儲空間和計算復雜度,具有一定的實用價值。 Abstract: Based on analyzing the theory of encoding and decoding of cyclic code, this paper showed the schemes of encoding and decoding of(24,16)cyclic code by the software and based on microcontroller. Simulation results show that using (24,16) cyclic codes can effectively overcome the interference from communication channel, ensure the reliability and stability of data communication systems, and reduce the bit error rate greatly. The results of this paper show that by using the (24,16) cyclic code, the error rate can be reduced and the system throughput can be improved. Meanwhile, the system only needs to enlarge limited storage space and computation the complexity at the receiving end to realize error correction. Thus the (24,16) cyclic code has a practical value.
標簽: 24 16 單片機系統(tǒng) 循環(huán)碼
上傳時間: 2013-11-09
上傳用戶:gaoliangncepu
介紹一種基于C8051F060單片機和NAND Flash的數(shù)據(jù)采集存儲系統(tǒng),該系統(tǒng)可實現(xiàn)3路信號采樣,每路采樣率為5KS/s,通過異步串行通信接口實現(xiàn)數(shù)據(jù)傳輸。并詳細說明系統(tǒng)的軟件設計。 Abstract: An acquisition and storage system based on C8051F060and NAND Flash is designed in this paper.The system is used to sample three-channel of signal,5KSPS each channel,and can upload data to test bench through UART(Universal Asynchronous Receiver/Transmitter).The software design is discussed in detail.
標簽: C8051F060 數(shù)據(jù)采集 存儲系統(tǒng)
上傳時間: 2013-10-12
上傳用戶:Jesse_嘉偉
公司簡介 應廣科技成立于2005年2月18日資本額RMB3千萬臺灣優(yōu)良IC設計公司主要核心技術:領先全球的平行處理多核心單片機。以軔體取代硬體設計的創(chuàng)新技術與思維。精簡的C語言編譯器。97個精簡指令開發(fā)容易,有效縮小程式空間提高工作效率。擁有全球數(shù)十項多核心單片機專利技術。經(jīng)專業(yè)測試認證ESD達8千伏特以上。超高抗雜訊能力,超高抗干擾能力。
上傳時間: 2014-12-27
上傳用戶:togetsomething
為解決輸油管道溫度壓力參數(shù)實時監(jiān)測的問題,設計了以C8051F930單片機作為控制核心的超低功耗輸油管道溫度壓力遠程監(jiān)測系統(tǒng)。現(xiàn)場儀表使用高精度電橋采集數(shù)據(jù),通過433 MHz短距離無線通信網(wǎng)絡與遠程終端RTU進行通信,RTU通過GPRS網(wǎng)絡與PC上位機進行遠程數(shù)據(jù)傳輸,在上位機中實現(xiàn)數(shù)據(jù)存儲和圖形化界面顯示,從而實現(xiàn)輸油管道溫度壓力參數(shù)的實時監(jiān)測和異常報警。經(jīng)實驗證明,該系統(tǒng)的12位數(shù)據(jù)采集精度滿足設計要求,漏碼率小于1%,正常工作時間超過5個月,能實時有效地監(jiān)測輸油管道的溫度壓力參數(shù),節(jié)省大量人工成本,有效預防管道參數(shù)異常造成的經(jīng)濟損失和環(huán)境污染。 Abstract: In order to solve the problems on real-time monitoring of pipeline temperature and pressure parameters, the ultra-low power remote pipeline temperature and pressure monitoring system was designed by using the single chip processor C8051F930 as the control core. The high-precision electric bridge was used in field instruments for data collection, the 433MHz short-range wireless communication network was used to make communication between field instrument and RTU, the GPRS was used by the RTU to transmit data to the PC host computer, and the data was stored and displayed in the PC host computer, so the real-time monitoring and exception alerts of pipeline temperature and pressure parameters were achieved. The experiment proves that the system of which error rate is less than 1% over five months working with the 12-bit data acquisition accuracy can effectively monitor the pipeline temperature and pressure parameters in real time, it saves a lot of labor costs and effectively prevents environmental pollution and economic losses caused by abnormal channel parameters.
標簽: C8051F930 溫度 壓力 遠程監(jiān)測系統(tǒng)
上傳時間: 2013-11-07
上傳用戶:cuibaigao
摘要:在機電排灌站的更新改造過程中,高效節(jié)能是主要指標之一。以89S52單片機為核心制作的電動機運行測試儀可以實時測量三相異步電動機的負載率,為排灌泵站改造時調(diào)整和更換合適的電動機提供可靠依據(jù),配以適當?shù)目刂圃?還具有輕載調(diào)壓節(jié)能和補償無功功率節(jié)能的功能。關鍵詞:單片機;排灌泵站;節(jié)能改造
上傳時間: 2013-11-03
上傳用戶:鳳臨西北
摘要:超低頻信號發(fā)生器是科研、教學、制造業(yè)中一種最常用的通用儀器,輸出波形一般固定為正弦波、三角波、鋸齒波和方波,不能實現(xiàn)有時在實驗和工程應用中需要的特殊信號或自定義信號。而要實現(xiàn)這一要求,不是做成硬件式的專用信號發(fā)生器,就是用計算機系統(tǒng)來完成,前者仍然不靈活,后者費用太高。然而應用單片機技術,通過軟件與硬件的有機結合由硬件電路搭成一個環(huán)境平臺,再由軟件程序把要求的“任意函數(shù)信號”數(shù)據(jù)表嵌入在單片機程序存儲器內(nèi),通過軟件程序更改輸出波形數(shù)據(jù)表,即可方便實現(xiàn)輸出任意函數(shù)信號,而無需變動硬件電路。本原理樣機使用單片機AT89C51,對其進行一次固化,可以安排四種任意波形,頻率范圍為0.001~800Hz,幅值范圍為0~±10V。本文中對原理樣機的軟硬件系統(tǒng)的性能和誤差進行了定量分析,并設計了一套使用Intel公司的新一代16位單片機80296SA對該樣機進行了性能提升的新型樣機方案,然后對新型樣機方案進行了原理分析和性能分析,并給出了誤差的定量計算,表明此方案不但可使樣機的原理頻率范圍提高至1500Hz,輸出幅值不變,輸出分辨率提高至212,使波形質(zhì)量大為改善。希望這種性價比較高的函數(shù)信號發(fā)生器對科研、教學、制造業(yè)有所幫助。關鍵詞:單片機應用 MCS51 MCS296 超低頻信號發(fā)生器
標簽: 單片機 函數(shù)信號發(fā)生器 超低頻
上傳時間: 2013-11-20
上傳用戶:7891