【正文】
20 22參考文獻(xiàn) 23附錄 24系統(tǒng)整體原理圖 24系統(tǒng)PCB設(shè)計(jì)圖 24系統(tǒng)源程序 251 緒 論 目的和意義在電量的測(cè)量中電壓、電流和頻率是最基本的三個(gè)被測(cè)量,其中電壓量的測(cè)量最為經(jīng)常,而且隨著電子技術(shù)的發(fā)展,更是需要測(cè)量高精度的電壓,所以基于單片機(jī)電壓表測(cè)量?jī)x器具有讀數(shù)準(zhǔn)確方便、精度高、誤差小、靈敏度高和分辨率高,測(cè)量速度快等特點(diǎn)而倍受青睞。單片機(jī)通過ADC0809采集8路的電壓值并可以顯示在液晶上。STC89C52的存儲(chǔ)器系統(tǒng)由4K的程序存儲(chǔ)器(掩膜ROM),和128B的數(shù)據(jù)存儲(chǔ)器(RAM)組成。7. 一個(gè)全雙工UART(通用異步接收發(fā)送器)的串行I/O 口,用于實(shí)現(xiàn)單片機(jī)之間或單機(jī)與微機(jī)之間的串行通信。 LCD液晶顯示器簡(jiǎn)介 液晶原理介紹液晶顯示器(LCD)英文全稱為Liquid Crystal Display,它一種是采用了液晶控制透光度技術(shù)來實(shí)現(xiàn)色彩的顯示器。表21寄存器選擇控制RSR/W操作說明00寫入指令寄存器(清除屏等)01讀busy flag(DB7)以及讀取位址計(jì)數(shù)器(DB0~DB6)值10寫入數(shù)據(jù)寄存器(顯示各字型等)11從數(shù)據(jù)寄存器讀取數(shù)據(jù) 如圖26所示。模擬輸入部分有8路多路開關(guān),可由3位地址輸入ADDA、ADDB、ADDC的不同組合來選擇,ALE為地址鎖存信號(hào),高電平有效,鎖存這三條地址輸入信號(hào)。 START: A/D轉(zhuǎn)換啟動(dòng)脈沖輸入端,輸入一個(gè)正脈沖(至少100ns寬)使其啟動(dòng)(脈沖上升沿使0809復(fù)位,下降沿啟動(dòng)A/D轉(zhuǎn)換)。 GND:地。 y 0 。 } } }void main(void){ LCDInit()。 EA=1。 getdata=P2。 } if(flag == 1) { LCDDispNum(4,1,ax+1)。i0。 設(shè)置8位格式,2行,5x7*LCD Write Command(0x0c) 整體顯示,關(guān)光標(biāo),不閃爍LCD Write Command(0x06) 設(shè)定輸入方式,增量不移位LCD Write Command(0x01) 清除屏幕顯示 DelayN40us(100) 清屏延時(shí) void LCD Write Command(unsigned char dat) 寫命令函數(shù),對(duì)LCD1602內(nèi)部寄存器進(jìn) 行操作。if(y==1) address=0xc0+x。temp[2] = dat/100%10。在本基于單片機(jī)的多路電壓采集系統(tǒng)的設(shè)計(jì)調(diào)試中遇到了很多的問題。解決:重新檢查矩陣鍵盤電路的連接,重新建立一個(gè)新的對(duì)應(yīng)關(guān)系。通過開發(fā)板的設(shè)計(jì)和硬件搭建的過程,使我對(duì)51系單片機(jī)的接口有了更深層次的理解,熟悉了一些單片機(jī)常用的外圍電路引腳和連接方法,如LCD液晶,鍵盤等。sbit OE=P3^2。unsigned char getdata。 if((Ax amp。.39。 y)。 LCDDispString(2,1,CH voltage)。 while(1) { if(ax==8) ax=0。 //獲取電壓值 cov2V(getdata,ax)。 LCDDispString(5,2,dispbuf)。 Input: unsigned int n 用于延時(shí)時(shí)間的確定,取值、 為1~65535 Output: 無 Return: 無***********************************************************/void DelayN40us(unsigned int n){ unsigned int i。 Description: 液晶初始化函數(shù),對(duì)LCD1602進(jìn)行初始化操作, 在每一次實(shí)用液晶前必須用到的,外部可調(diào)用 函數(shù)。/*整體顯示,關(guān)光標(biāo),不閃爍*/ LCDWriteCommand(0x06)。 void LCDDispNum(unsigned char x,unsigned char y,unsigned char dat)。 Description: 寫數(shù)據(jù)函數(shù),將數(shù)據(jù)寫入LCD1602中。/*寫入數(shù)據(jù)值*/ LCD_E=1。及其他 Input: X(015),y(12),dat為顯示字符‘a(chǎn)’形式。 Calls: LCDWriteCommand(unsigned char dat)。 /*輸入地址*/ LCDWriteData(dat+48)。 Calls: LCDDispNum(unsigned char x,unsigned char y,unsigned char dat)。 temp[4] = dat%10。 you don39。Further help.If you are being represented by a solicitor at the tribunal, they may ask you to sign an agreement where you pay their fee out of your pensation if you win the case. This is known as aEmployment tribunals.The (lack of) air up there Watch mCayman Islandsbased Webb, the head of Fifa39。s 21 win.Michel Platini, president of European football39。The end of our life, and can meet many things really do? 而窮盡我們的一生,又能遇到多少事情是真正地非做不可?During my childhood, think lucky money and new clothes are necessary for New Year, but as the advance of the age, will be more and more found that those things are optional。s time, your ideas are always special to clear. Want, want, line is clear, as if nothing could shake his. Also once seemed to be determined to do something, but more often is he backed out at last. Dislike his cowardice, finally found that there are a lot of love, there are a lot of miss, like shadow really have been doomed. Those who do, just green years oneself give oneself an arm injection, or is a selfrighteous spiritual. 一個(gè)人的時(shí)候,自己的想法總是特別地清晰。 Have declared the end of the encounter that haven39。t. Baumgartner still will free fall at a speed that would cause you and me to pass out, and no parachute is guaranteed to work higher than 25,000 feet (7,620 meters).cause there。 Those were broken into various shapes of stationery。Originally, this world, can produce a chemical reaction to an event, in addition to resolutely, have to do, and time. 原來,這個(gè)世界上,對(duì)某個(gè)事件能產(chǎn)生化學(xué)反應(yīng)的,除了非做不可的堅(jiān)決,還有,時(shí)間。總覺得自己自己似乎應(yīng)該去做點(diǎn)什么,或者寫點(diǎn)什么。for the racist behaviour of their fans duringTo find your nearest CAB, including those that give advice by , click onagainst the disciplinary action your employer has taken against you. However, if you win your case, the tribunal may reduce any pensation awarded to you as a result of your failure to appeal.Remember that in most cases you must make an application to an employment tribunal within three months of the date when the event you are plaining about happened. If your application is received after this time limit, the tribunal will not usually accept it.If you are worried about how the time limits apply to you, take advice from one of the organisations listed underj++) /*依次顯示各個(gè)數(shù)*/ LCDDispNum(x+j,y,temp[j+i])。 temp[2] = dat/100%10。 /*行地址加1*/ }}/********************************************************* Function: void LCDDispNumInt(unsigned char x,unsigned char y,unsigned int dat)。 /*顯示在第一排的時(shí)候的x的地址*/ else address=0xc0+x。 /*輸入數(shù)據(jù)*/ }/********************************************************* Function: void LCDDispNum(unsigned char x,unsigned char y,unsigned char dat)。 void LCDWriteData(unsigned char dat)。 LCD_RS=1。 DelayN40us(1)。 Called By: void LCDInit(void)。/*設(shè)置8位格式,2行,5x7*/ LCDWriteCommand(0x38)。j++)。 Calls: 沒有調(diào)用其它函數(shù) Called By: void LCDWriteCommand(unsigned char dat)。 ax++。 OE=1。 ET0=1。 if(key_2 == 0) { ax++。 x) for(y = 110 。}