【正文】
th anniversary celebrations and will attend City39。將取到的現(xiàn)實(shí)碼送 P0 顯示 LCALL DELAY SETB 。判斷秒顯示單元的十位、個(gè)位 CLR MOVC A,A+DPTR 。判斷秒是否到了 60 INC MINUTE 。同時(shí)也祝愿學(xué)院明天更美好。在對(duì)各單元計(jì)數(shù)的同時(shí),把他們的值放到存儲(chǔ)器單元的制定位置。 主程序執(zhí)行流程圖 主程序先對(duì)現(xiàn)實(shí)單元和定時(shí)器計(jì)數(shù)器初始化,然后重復(fù)調(diào)用數(shù)碼管顯示模塊和按鍵處理模塊,當(dāng)有按鍵按下,則轉(zhuǎn)入相應(yīng)的功能程序。采用軟件編程實(shí)現(xiàn)時(shí)鐘計(jì)數(shù),一般稱(chēng)為軟時(shí)鐘,這種方法硬件線路簡(jiǎn)單,程序比較復(fù)雜。 . 計(jì)算原則: 最大值的計(jì)算原則:要保證上拉電阻明顯小于負(fù)載的阻抗,以使高電平時(shí)輸出有效。 177。容量單位 CAPACITANCE UNIT 1 Farad=1,000 Milli Farad(mF) 1 mF=1,000 Micro Farad (MFD,μ F) 1 μ F=1,000 Nano Farad(nF) 1 nF=1,000 Pico Farad(pF) 容量誤差符號(hào): B C D F G H I J K M N V Z 誤差 % 177。注:象剛才的簡(jiǎn)標(biāo)常用于以 PF 為單位 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 13 的電容,如 1000pf 就是 10X102 標(biāo)為 10 和 2 即 102, 10000 當(dāng)然是 104 了,3300 則為 332。 3. 色標(biāo)法 這種表示方法與電阻器的色環(huán)表示方法類(lèi)似,其顏色所代表的數(shù)字與電阻色環(huán)完全一致,單位為 pF。 5%,耐壓為 100V。 3. 微處理器用石英晶體諧振器。 . 數(shù)碼管使用注意事項(xiàng): 1. 數(shù)碼管表面不要用手觸摸,不要用手去弄引角 2. 焊接溫度: 260 度;焊接時(shí)間: 5S 3. 表面有保護(hù)膜的產(chǎn)品 ,可以在使用前撕下來(lái)。在此瞬間,段選控制 I/O 口輸出相應(yīng)字符段選碼(字型碼),而位選則控制 I/O 口在該顯示位送入選通電平(因?yàn)?LED 為共陰,故應(yīng)送低電平),以保證該位顯示相應(yīng)字符。靜態(tài)顯 示就是當(dāng)顯示器顯示某個(gè)字符時(shí),相應(yīng)的段恒定的導(dǎo)通或截止,直到顯示另一個(gè)字符為止。 4. 由于 P2 口始終輸出地址的高 8 位,接口時(shí) 74LS245 的三態(tài)控制端 /1G 和 /2G 接地,P2 口與驅(qū)動(dòng)器輸入線對(duì)應(yīng)相連。顯然,對(duì)內(nèi)部無(wú)程序存儲(chǔ)器的 8031,EA 端必須接地。然而,初復(fù)位步改變 RAM(包括工作寄存器 R0R7)的狀態(tài), 8951 的初始態(tài)。 5. 中斷系統(tǒng): 8051 具 備較完善的中斷功能,有兩個(gè)外中斷、兩個(gè)定時(shí) /計(jì)數(shù)器和一個(gè)串行中斷,可滿(mǎn)足不同的控制要求,并具有 2 個(gè)級(jí)的優(yōu)先級(jí)別的選擇。 靈活的 ISP 字節(jié)和分頁(yè)編程 全雙工 UART 串行中斷口線 同時(shí)該芯片還具有 PDIP、 TQFP 和 PLCC等三 種封裝形式,以適應(yīng)不同產(chǎn)品的需求。電路設(shè)計(jì)及調(diào)試過(guò)程,本次做的數(shù)字時(shí)鐘十以( AT89S51)為核心,結(jié)合相關(guān)的元器件(共陰的 LED 數(shù)碼管顯示器 、驅(qū)動(dòng)器 74LS245),在配以相應(yīng)的軟件,達(dá)到制作簡(jiǎn)易數(shù)字鐘的目的,其硬件部分難點(diǎn)在于元器件的選擇、布局及焊接。 關(guān)鍵詞 : 單片機(jī) 數(shù)字時(shí)鐘 LED數(shù)碼管顯示 按鍵 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 Abstract The base and 51 digital clock when the microcontroller can be the school circuit design, singlechip puter that is singlechip microputer. (SingleChip Microputer) is a CPU, RAM, ROM, counting and multiple interfaces in one microcontroller. Quartz crystal oscillator is a highprecision timing tools, electronic clock, quartz watch, quartz is used quartz technology, high precision timing, good stability, easy to use, does not require frequent adjustment. The digital electronic clock with the time integrated circuits, the decoding instead of mechanical transmission, with LED display instead of a pointer display and then display the time and reduce the timing error, this table has the hours, minutes and seconds displays the time function, but also in progress and subproofreading, the flexibility of a good chip select. In this paper, MCU function digital clock timing the main contents of which AT89S51 is a core element at the same time the use of digital control dynamic display time, sub, second modern timing devices. Compared with the traditional mechanical watch, it has a traveltime accuracy, display and intuitive and so on. It is a time period of 24 hours, substantially fullscale as 23:59:59, another time with a school function, memory function after power outages, power restoration can be realized when the time synchronization and so on. The design by the MCU AT89S51 chip and LED digital tube as the core, supplemented by the necessary circuitry to form a single chip digital clock. Key words: shrapnel machine digital clock LED digital tube display button 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 目 錄 引言 …………. ………… . ………. ……… …. …………. … ……… .… …. …………. 1 1 AT89S51 芯片簡(jiǎn)介: ............................................................................... 2 內(nèi)部結(jié)構(gòu) ......................................................................................... 2 . 中央處理器: ........................................................................................... 3 . 數(shù)據(jù)存儲(chǔ)器( RAM): .......................................................................... 3 89S51 的引腳說(shuō)明: ...................................................................... 4 . Pin9: RESET/Vpd 復(fù)位信號(hào)復(fù)用腳: ................................................. 5 . Pin30: ALE/PROG 引腳: ..................................................................... 5 . Pin31: EA/Vpp 引腳: ........................................................................... 6 2 驅(qū)動(dòng)器 74LS245 簡(jiǎn)介: ...................................................................... 7 3 LED 數(shù)碼管簡(jiǎn)介 ........................................................................................ 8 LED 數(shù)碼管顯示器結(jié)構(gòu)與原理 .................................................... 8 LED 顯示器接口及顯示方式 ........................................................ 8 . 數(shù)碼管使用條件: ................................................................................... 9 . 數(shù)碼管使用注意事項(xiàng): ......................................................................... 10 4 相關(guān)硬件的其他元器件的簡(jiǎn)介 ......................................................... 11 晶體振蕩器簡(jiǎn)介 ........................................................................... 11 . 晶體振蕩器的應(yīng)用: ............................................................................. 11 電子電容器的標(biāo)識(shí) ....................................................................... 12 . 電容器標(biāo)識(shí)的方法: ........................................................................... 12 . 常用電容的幾項(xiàng)特性: ....................................................................... 12 . 電容容量的標(biāo)注及使用常識(shí): ........................................................... 12 電阻的選用簡(jiǎn)介 ........................................................................... 13 . 作用 : ...................................................................................................... 13 . 計(jì)算原則: ............................................................................................ 14 . 注意: .................................................................................................... 14 電 子 時(shí) 鐘 的 設(shè) 計(jì) 與 制 作 5 電路制作原理制作分析 ..................................................................... 15 主程序執(zhí)行流程圖