【正文】
計采用 CD4060來對 4M信號進行 32分頻得到 125KHz的時鐘信號。 AT89S52還 有以下主要特點: ① 采用了 ATMEL 公司的高密度、非易失性存儲器( NVSRAM)技術(shù); ② 其片內(nèi)具有 256字節(jié) RAM, 8KB的可在線編程( ISP) FLASH存儲器; ③ 有 2 種低功耗節(jié)電工作方式:空閑模式和掉電模式 ④ 片內(nèi)含有一個看門狗定時器( WDT), WDT包含一個 14 位計數(shù)器和看門狗定時器復(fù)位寄存器(WDTRST),只要對 WDTRST 按順序先寫入 01EH,后寫入 0E1H, WDT便啟動,當(dāng) CPU由于擾動而使程序陷入死循環(huán)或 “ 跑飛 ” 狀態(tài)時, WDT 即可有效地使系統(tǒng)復(fù)位,提高了系統(tǒng)的抗干擾性能。但對于內(nèi)帶字符發(fā)生器的控 制器來說,顯示字符就比較簡單了,可讓控制器工作在文本方式,根據(jù)在 LCD 上開始顯示的行列號及每行的列數(shù)找出顯示 RAM 對應(yīng)的地址,設(shè)立光標(biāo),在此送上該字符對應(yīng)的代碼即可。 LCD各地址列舉如下表: 表 LCD1601 16 1 顯示字的外部地址 16 1 16字 1行 1601 11 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 80 81 82 83 84 85 86 87 C0 C1 C2 C3 C4 C5 C6 C7 表 LCD1601 的指令組 指 令 說 明 設(shè)置碼 RS R/W D7 D6 D5 D4 D3 D2 D1 D0 清除顯示幕 0 0 0 0 0 0 0 0 0 * 光標(biāo)回到原點 0 0 0 0 0 0 0 0 1 * 進入模式設(shè)定 0 0 0 0 0 0 0 1 I/D S 顯示幕 ON/OFF 0 0 0 0 0 0 1 D C B 移位 0 0 0 0 0 1 S/C R/L * * 功能設(shè)定 0 0 0 0 1 DL N F * * 字發(fā)生器地址設(shè)定 0 0 0 1 AGC 設(shè)置顯示地址 0 0 0 1 ADD 忙碌標(biāo)志位 BF 0 0 1 BF 顯示數(shù)據(jù) 1 0 寫入數(shù)據(jù) 讀取數(shù)據(jù) 1 1 讀取數(shù)據(jù) I/D I/D=1 表示加 1, I/D=0 表示減 1 S S=1 表示顯示幕 ON S=0表示 OFF D D=1 表示顯示屏幕 ON D=0表示顯示屏幕 OFF C C=1 表示光標(biāo) ON C=0表示光標(biāo) OFF B B=1 表示閃爍 ON B=0表示顯示閃爍 OFF S/C S/C=1表示顯示屏幕移位 S/C=0光標(biāo)移位 R/L R/L=1表示右移 R/L=0表示左移 DL DL=1表示 8位 DL=0表示 4位 F F=1表示 5 10點矩陣 F=0表示 5 7點矩陣 N N=1表示 2行顯示行 N=0表示 1行顯示行 BF BF=1:內(nèi)部正在動作 BF=0:可接收指令或數(shù)據(jù)碼 12 液晶顯示部分與 89S52 的接口 如圖所示:用 89S52的 P2口作為數(shù)據(jù)線,用 、 、 分別作為 LCD的 E、 R/W、RS。 每個驅(qū) 動器將 TTL/CMOS 輸入電平轉(zhuǎn)換 為 EIA/TIA232E 電平。主程序一開始運行則設(shè)置堆棧起始地址為 70H,設(shè)置中斷寄存器,用來對 ICL7135 的中斷進行計數(shù),每 5次后清零,完成一次數(shù)據(jù)采集工作,然后設(shè)置ICL7135的 STB端的中斷的優(yōu)先級。送到數(shù)據(jù) DB7DB0,調(diào)用子程序 ENABLE,由于下降沿時,內(nèi)部數(shù)據(jù)要送到 RAM區(qū),所以要有一個延時子程序,使這個下降沿持續(xù) 。 調(diào)用一次子程序 ENABLE 程序,寫入 CPU的指令寄存器中。字符 ‘ Voltage’ 的 TABLE 表地址送到 DPTR中,然后調(diào)用遠程查表 命令,依次把數(shù)據(jù)送到 P2口,這時再調(diào)用子程序 WRITE3,使 LCD1601的 RS=1,R/W=0使使能端 E產(chǎn)生一個下降沿脈沖,將數(shù)據(jù)送入到數(shù)據(jù)寄存器中,接下來執(zhí)行子程序 DISPLAY1,它的主要功能是將 TABLE 表中的字符輸出到 LCD 中去。采樣數(shù)據(jù)存放的數(shù)據(jù)地址安排如下圖所示 ,首先將 60H 中的數(shù)顯示在正負號的位置上,按照 ASCII碼表,正號不顯示( 20H),負號顯示“-”( 2DH)。 例如: 2022V檔量程: ─ 0 1 9 9 . 9 此時萬位的值 ‘ 0’ 不符合人們的視覺習(xí)慣,需要把萬位的值消隱掉,編程是將20H送入萬位,使其在 LCD中不顯示任何字符即可。但接收緩沖器只能讀出不能寫入,而發(fā)送緩沖器則只能寫入不能讀出,它們的地址為 99H。本方式選方式 1, 一幀 數(shù)據(jù)有 10 位,包括起始位 0、 8 位數(shù)據(jù)位和 1位停止位 1。由定時器 1 最好工作在方式 2 上(自動重裝載模式),這樣只需對 TH1設(shè)置一次即可。 AJMP A6 ;否則 跳到 A6,等待 A5: INC R0 5 結(jié)束語 電壓測量通過不同的接口電路可實現(xiàn)溫度 、 濕度 、 壓力等測量,廣泛應(yīng)用于工業(yè)領(lǐng)域。有時午夜向李老師求助,他從不推辭,認真解答。 指導(dǎo)教師要求也不高。 設(shè)計個至少測 DC1000V溫度計,要誤差小于 ,液晶顯示 ,可換擋測量。 這個設(shè)計的難度在于編程 ,液晶顯示,可換擋測量更增加了設(shè)計難度。 為了盡量追求完美,我加了很多輔助的部分。 那短日子真的是難熬啊,幾乎每時每刻都在想辦法??赡芏娜苏J為沒什么大不了的,對于只上了不到 50個學(xué)時的課,沒有上過實習(xí)課的我,太不容易了。80s. We sat on the back of pickup trucks for hours. The sky was blue, and we couldn39。s performers of the troupe still tour the region39。s Liaoning province, decades ago. The solider gave the old man a handmade saddle when they bid farewell. The story inspired Nasun to write Carved Saddle, a song that later became one of his most popular numbers. Now, every year, Nasun recruits young singers and dancers for the troupe. The troupe has also designed a new repertoire, which is mostly based on the daily lives of Mongolian people, especially the lives of nomadic families, and has bined contemporary musical elements with folk songs of the region. Haimu, a 25yearold khoomei (a local variant of overtone singing) singer, joined the troupe three years ago. Along with a sixmember band, he performs fast songs and soft ones that he writes- all while playing the horsehead fiddle.Although I learned the piano since childhood and grew up listening to various kinds of music, to me, the folk music of Inner Mongolia is the root, he says. Performing in remote villages is pleasant. I feel at home on the boundless grasslands, and the warm people there make me feel fulfilled. The first round of spring auction season in Beijing ended last week, but it failed to create much spring in the art market. Although two pieces of Chinese painting fetched more than 100 million yuan, the decline in trading volume and sa le rate showed a downturn this year. In the ―Grand View: Chinese Painting Highlight‖ session at China Guardian 2022 spring auctions, Pan Tianshou’s representative work Eagle, Rock and Flora hit a record auction price of 279 million yuan, while Li Keran’s masterwork Jinggang Mountain fetched million yuan, an unexpected high in recent years. However, the trading volume fells to billion yuan from billion yuan in the same period the year before. The Huangchen 2022 Spring Auctions, which recorded million yuan in total sales, experienced the same. The section number went down to 5 from 12 pared to last year. According to expert Shao Jianwu, the art market did not attract much excitement this year due to the booming stock market and the persistent problems of fery and fake deals. The two pieces of Chinese painting notched up high price this spring due to their own value not due to a revival in the market. The successful transaction of two works with a hammer price of more than 100 million yuan once again confirms that valuable and rare works of high quality always earn the lon