【正文】
單片機(jī)系統(tǒng)模塊 1602 液晶顯示模塊 A/D 轉(zhuǎn)換模塊 輸入電路模塊 按鍵模塊 15 此模塊中,單片機(jī)的晶振是 12MHZ, C1和 C2的電容是 10UF, C3可選110UF。匯編語言的特點(diǎn)是占用內(nèi)存單元少,執(zhí)行效率高。 sbit output=P1^3。x) for(y=10。 rw=0。 23 switch(x) { case 0:add=0x80。 write_dat(a[1]+0x30)。 clk=0。 dq=read_AD(0)。 long float dat_aver,dat1,dat2,dat3,dat4,dat5。 if(flag==2) dat2=dat。 1. 硬件調(diào)試 硬件調(diào)試的主要任務(wù)是排除硬件故障,其中包括設(shè)計(jì)的錯(cuò)誤和工藝性故障等。可以在硬件電路的輸入端輸入已知的幾個(gè)電壓,分別觀察液晶上是否顯示相應(yīng)的電壓值。 此設(shè)計(jì)是單片機(jī)應(yīng)用系統(tǒng)的開發(fā)性實(shí)驗(yàn)。t appealed against 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 anisations listed under Further help. Employment tribunals are less formal than some other courts, but it is still a legal process and you will need to give evidence under an oath or affirmation. Most people find making a claim to an employment tribunal challenging. If you are thinking about making a claim to an employment tribunal, you should get help straight away from one of the anisations listed under 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 a damagesbased agreement. In England and Wales, your solicitor can39。 Junior high school, thought to have a crush on just means that the real growth, but over the past three years later, his writing of alumni in peace, suddenly found that isn39。t start planning... Those years, those days of do, finally, like youth, will end in our life. 此刻,天空是陰暗的,空氣里有著剛下過雨之后的清新因子。 34 At the moment, the sky is dark, the air is fresh factor after just rained. Suddenly thought of blue plaid shirt?;蛟S是愧疚于自己似乎把轉(zhuǎn)瞬即逝的很多個(gè)不同的日子過成了同一天的樣子;或許是追溯過去,對自己那些近乎偏執(zhí)的怪異信念的醒悟,這些天以來,思緒一直很凌亂,在腦海中不斷糾纏。 參考文獻(xiàn) 1) 陳洪中。因?yàn)槠綍r(shí)所需要測量的被測電壓的電壓值不是一個(gè)定值,多多少少都有一些微小的變化。 2) 檢查按鍵模塊程序。//重新放入初始值 TL0=(6553650000)%256。 } read_key()。 break。 } cs=1。 str++。 write_dat(a[2]+0x30)。 IE=0x82。 ep=1。//平均電壓值標(biāo)志符 uchar t。 主程序的總體流程如下圖: 全部軟件程序如下: include define uchar unsigned char define uint unsigned int define key_state0 0 //鍵盤掃描的各個(gè)狀態(tài) 開始 對液晶,定時(shí)器初始化 A/D 轉(zhuǎn)換 數(shù)據(jù)轉(zhuǎn)換 顯示瞬時(shí)電壓值 鍵盤判斷 顯示 5 秒的平均電壓值 3 秒后清屏 20 define key_state1 1 define key_state2 2 define key_state3 3 sbit rs=P1^2。原理圖如下所示。 2.設(shè)計(jì)方案: 根據(jù)上述,我們選擇單片機(jī)與 A/D轉(zhuǎn)換芯片結(jié)合的方法實(shí)現(xiàn)本設(shè)計(jì)。 CS一旦有效,按照前一次轉(zhuǎn)換結(jié)果的 MSB/LSB 值將 data out從高阻抗?fàn)顟B(tài)轉(zhuǎn)變成相應(yīng)的邏輯電平, I/O clk 的下一個(gè)下降沿將根據(jù)下一個(gè) MSB/LSB 將 data out驅(qū)動成相應(yīng)的邏輯電平,剩下的各位依次移出。 綜合上述幾種 A/D轉(zhuǎn)換芯片的特點(diǎn),前兩種芯片的性能和精度都不如第 三種芯片。 顯示模式設(shè)置 指令碼 功能 0 0 1 1 1 0 0 0 設(shè)置 16*2顯示, 5*7點(diǎn)陣, 8位數(shù)據(jù)口 顯示開 /關(guān)及光標(biāo)設(shè)置 指令碼 功能 0 0 0 0 1 D C B D=1 開顯示; D=0關(guān)顯示 C=1 顯示光標(biāo); C=0不顯示關(guān)標(biāo) B=1 光標(biāo)閃爍; B=0光標(biāo)不顯閃爍 0 0 0 0 0 1 N S N=1 當(dāng)讀寫一個(gè)字條款后地址指針加一,且光標(biāo)加一。 12864液晶也是一種工業(yè)字符 型液晶,它不僅能夠顯示 1602液晶所可以顯示的字符,數(shù)字等信息,而且還可以顯示 8*4 個(gè)中文漢字和一些簡單的圖片,顯示信息也非常的清楚。 綜合以上各種單片機(jī)的基本性能及本設(shè)計(jì)的滿足需要,我 們將選擇 51系列單片機(jī)。由于單片機(jī)的發(fā)展已經(jīng)成熟,利用單片機(jī)系統(tǒng)的軟硬件結(jié)合,可以組裝出許多的應(yīng)用電路來。其中,電壓量的測量最為經(jīng)常。 如今,數(shù)字電壓表已絕大部分已取代了傳統(tǒng)的模擬指針式電壓表。 ............................................................................. 5 三.單片機(jī)簡介及本設(shè)計(jì)單片機(jī)的選擇 ....................................................................................... 5 1.常用單片機(jī)的特點(diǎn)比較及本設(shè)計(jì)單片機(jī)的選擇 ............................................................. 5 2.本設(shè)計(jì)使用的單片機(jī)的簡介 ............................................................................................. 6 四.各種顯示器件的介紹和選擇 ................................................................................................... 7 1.常用顯示器件簡介 ............................................................................................................. 7 2. 1602液晶的參數(shù)資料 ........................................................................................................ 8 五.模數(shù)( A/D)轉(zhuǎn)換芯片的選擇 .............................................................................................. 10 1.常用的 A/D 芯片簡介 ....................................................................................................... 10 2.模數(shù)( A/D)芯片 TLC2543的資料 ................................................................................ 11 六.總體設(shè)計(jì) ................................................................................................................................ 13 七.硬件電路系統(tǒng)模塊的設(shè)計(jì) ..................................................................................................... 14 八.系統(tǒng)軟件的設(shè)計(jì) .................................................................................................................... 18 1.匯編語言和 C 語言的特點(diǎn)及選擇 ................................................................................... 18 2.主程序設(shè)計(jì) ....................................................................................................................... 18 九.系統(tǒng)的調(diào)試 ...............................................................