freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

數(shù)字電壓表的設(shè)計(jì)與制作畢業(yè)設(shè)計(jì)-資料下載頁(yè)

2025-06-30 20:49本頁(yè)面
  

【正文】 t a constant rate of 1/6 the oscillator frequency and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external data memory.If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALEdisable bit has no effect if the microcrontroller is in external execution mode.PSENProgram Store Enable is the read strobe to external program memory. When the AT89C52 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory.EA/VPPExternal Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset.EA should be strapped to VCC for internal program executions. This pin also receives the 12volt programming enable voltage (VPP) during Flash programming when 12volt programming is selected.XTAL1Input to the inverting oscillator amplifier and input to the internal clock operating circuit.XTAL2Output from the inverting oscillator amplifier.Special Function RegistersA map of the onchip memory area called the Special Function Register (SFR) space is shown in Table 1.Note that not all of the addresses are occupied, and unoccupied addresses may not be implemented on the chip. Read accesses to these addresses will in general return random data, and write accesses will have an indeterminate effect.User software should not write 1s to these unlisted locations, since they may be used in future products to invoke new features. In that case, the resetor inactive values of the new bits will always be 0.Timer 2 Registers Control and status bits are contained in registersT2CON (shown in Table 2) and T2MOD (shown in Table 4) for Timer 2. The register pair (RCAP2H, RCAP2L) are the Capture/Reload registers for Timer 2 in 16bit capture mode or 16bit autoreload mode. Interrupt Registers The individual interrupt enable bits are in the IE register. Two priorities can be set for each of the six interrupt sources in the IP register譯文:AT89S52芯片介紹主要性能與MCS51單片機(jī)產(chǎn)品兼容8K字節(jié)在系統(tǒng)可編程Flash存儲(chǔ)器全靜態(tài)操作:0HZ24MHZ三級(jí)加密程序存儲(chǔ)器256x8位內(nèi)部RAM32個(gè)可編程I/O口線(xiàn)三個(gè)16位定時(shí)器/計(jì)數(shù)器八個(gè)中斷源可編程的串行通道低功耗空閑和掉電模式介紹At89s52是一種低功耗、高性能CMOS8位微控制器,具有8K在系統(tǒng)可編程Flash存儲(chǔ)器。使用Atmel公司高密度非易失性存儲(chǔ)器技術(shù)制造,與工業(yè)80C51產(chǎn)品指令和引腳完全兼容。片上Flash允許程序存儲(chǔ)器在系統(tǒng)可編程,亦適于常規(guī)編程器。在單芯片上,擁有靈巧的8位CPU和在系統(tǒng)可編程Flash,使得AT89S52為眾多嵌入式控制應(yīng)用系統(tǒng)提供高靈活、超有效的解決方案。AT89S52具有以下標(biāo)準(zhǔn)功能:8k字節(jié)Flash,256字節(jié)RAM,32位I/O口線(xiàn),三個(gè)16位定時(shí)器/計(jì)數(shù)器,一個(gè)6向量2級(jí)中斷結(jié)構(gòu),全雙工串行口, 片內(nèi)晶振及時(shí)鐘電路。另外,AT89S52可降至0Hz靜態(tài)邏輯操作,支持2種軟件可選擇節(jié)電模式。空閑模式下,CPU停止工作,允許RAM、定時(shí)器/計(jì)數(shù)器、串口、中斷繼續(xù)工作。掉電保護(hù)方式下,RAM內(nèi)容被保存,振蕩器被凍結(jié),單片機(jī)一切工作停止,直到下一個(gè)中斷或硬件復(fù)位為止。引腳介紹VCC電源電壓。GND地面。P0口P0口是一個(gè)8位漏極開(kāi)路的雙向I/O口。作為輸出口,每位能驅(qū)動(dòng)8個(gè)TTL邏輯電平。對(duì)P0端口寫(xiě)“1”時(shí),引腳用作高阻抗輸入。當(dāng)訪(fǎng)問(wèn)外部程序和數(shù)據(jù)存儲(chǔ)器時(shí),P0口也被作為低8位地址/數(shù)據(jù)復(fù)用。在這種模式下,P0具有內(nèi)部上拉電阻。在flash編程時(shí),P0口也用來(lái)接收指令字節(jié);在程序校驗(yàn)時(shí),輸出指令字節(jié)。程序校驗(yàn)時(shí),需要外部上拉電阻。P1口P1口是一個(gè)具有內(nèi)部上拉電阻的8位雙向I/O口,P1輸出緩沖器能驅(qū)動(dòng)4個(gè)TTL邏輯電平。對(duì)P1端口寫(xiě)“1”時(shí),內(nèi)部上拉電阻把端口拉高,此時(shí)可以作為輸入口使用。作為輸入使用時(shí),被外部拉低的引腳由于內(nèi)部電阻的原因,將輸出電流(IIL)。此外,()和時(shí)器/計(jì)數(shù)器2的觸發(fā)輸入(),具體如下表所示。在flash編程和校驗(yàn)時(shí),P1口接收低8位地址字節(jié)。P2口P2口是一個(gè)具有內(nèi)部上拉電阻的8位雙向I/O口,P2輸出緩沖器能驅(qū)動(dòng)4個(gè)TTL邏輯電平。對(duì)P2端口寫(xiě)“1”時(shí),內(nèi)部上拉電阻把端口拉高,此時(shí)可以作為輸入口使用。作為輸入使用時(shí),被外部拉低的引腳由于內(nèi)部電阻的原因,將輸出電流(IIL)。在訪(fǎng)問(wèn)外部程序存儲(chǔ)器或用16位地址讀取外部數(shù)據(jù)存儲(chǔ)器(例如執(zhí)行MOVX@DPTR)時(shí),P2口送出高八位地址。在這種應(yīng)用中,P2口使用很強(qiáng)的內(nèi)部上拉發(fā)送1。在使用8位地址(如MOVX@RI)訪(fǎng)問(wèn)外部數(shù)據(jù)存儲(chǔ)器時(shí),P2口輸出P2鎖存器的內(nèi)容。P3口P3口是一個(gè)具有內(nèi)部上拉電阻的8位雙向I/O口,P3輸出緩沖器能驅(qū)動(dòng)4個(gè)TTL邏輯電平。對(duì)P3端口寫(xiě)“1”時(shí),內(nèi)部上拉電阻把端口拉高,此時(shí)可以作為輸入口使用。作為輸入使用時(shí),被外部拉低的引腳由于內(nèi)部電阻的原因,將輸出電流(IIL)。P3口亦作為AT89S52特殊功能(第二功能)使用,P3口也接收一些控制信號(hào)。RST復(fù)位輸入。當(dāng)振蕩器工作時(shí),RST引腳出現(xiàn)兩個(gè)機(jī)器周期以上高電平將是單片機(jī)復(fù)位。ALE/PROG當(dāng)訪(fǎng)問(wèn)外部程存儲(chǔ)器或數(shù)據(jù)存儲(chǔ)器時(shí),ALE(地址鎖存允許)輸出脈沖用于鎖存地址的低8位字節(jié)。一般情況下,ALE仍以時(shí)鐘振蕩頻率的1/6輸出固定的脈沖信號(hào),因此它可對(duì)外輸出時(shí)鐘或用于定時(shí)目的。要注意的是:每當(dāng)訪(fǎng)問(wèn)外部數(shù)據(jù)存儲(chǔ)器時(shí)將跳過(guò)一個(gè)ALE脈沖。對(duì)FLASH存儲(chǔ)器編程期間,該引腳還用于輸入編程脈沖(PROG)。如有必要,可通過(guò)對(duì)特殊功能寄存器(SFR)區(qū)中的8EH單元的D0位置位,可禁止ALE操作。該位置位后,只有一條MOVX和MOVC指令才能將ALE激活。此外,該引腳會(huì)被微弱拉高,單片機(jī)執(zhí)行外部程序時(shí),應(yīng)設(shè)置ALE禁止位無(wú)效。PSEN程序儲(chǔ)存允許(PSEN)輸出是外部程序存儲(chǔ)器的讀選通信號(hào),當(dāng)AT89C52由外部程序存儲(chǔ)器取指令(或數(shù)據(jù))時(shí),每個(gè)機(jī)器周期兩次PSEN有效,即輸出兩個(gè)脈沖,在此期間,當(dāng)訪(fǎng)問(wèn)外部數(shù)據(jù)存儲(chǔ)器,將跳過(guò)兩次PSEN信號(hào)。EA/VPP外部訪(fǎng)問(wèn)允許,欲使CPU僅訪(fǎng)問(wèn)外部程序存儲(chǔ)器(地址為0000HFFFFH),EA端必須保持低電平(接地)。需注意的是:如果加密位LB1被編程,復(fù)位時(shí)內(nèi)部會(huì)鎖存EA端狀態(tài)。如EA端為高電平(接Vcc端),CPU則執(zhí)行內(nèi)部程序存儲(chǔ)器的指令。FLASH存儲(chǔ)器編程時(shí),該引腳加上+12V的編程允許電源Vpp,當(dāng)然這必須是該器件是使用12V編程電壓Vpp。XTAL1振蕩器反相放大器及內(nèi)部時(shí)鐘發(fā)生器的輸入端XTAL2振蕩器反相放大器的輸出端特殊功能寄存器特殊功能寄存器(SFR)的地址空間映象如表1所示。并不是所有的地址都被定義了。片上沒(méi)有定義的地址是不能用的。讀這些地址,一般將得到一個(gè)隨機(jī)數(shù)據(jù);寫(xiě)入的數(shù)據(jù)將會(huì)無(wú)效。用戶(hù)不應(yīng)該給這些未定義的地址寫(xiě)入數(shù)據(jù)“1”。由于這些寄存器在將來(lái)可能被賦予新的功能,復(fù)位后,這些位都為0。定時(shí)器2寄存器T2CON和T2MOD包含定時(shí)器2的控制位和狀態(tài)位(如表2和表3所示),寄存器對(duì)RCAP2H和RCAP2L是定時(shí)器2的捕捉/自動(dòng)重載寄存器。中斷寄存器各中斷允許位在IE寄存器中,六個(gè)中斷源和兩個(gè)優(yōu)先級(jí)也可以在IE中第 34 頁(yè) 共 55 頁(yè)附錄B:電路總圖附錄C:實(shí)物圖附錄D:元器件清單器件名稱(chēng)型號(hào)數(shù)量備注單片機(jī)芯片AT89C511模數(shù)轉(zhuǎn)換芯片ADC08091液晶顯示器LCD16021按鍵開(kāi)關(guān)脈沖按鍵3晶振12M1排阻9針1電位器50k1電位器10k3電阻1電阻10k1電阻100k6電阻51k2電容10uF/25v1電容30pF2附錄E:源程序includeincludedefine uint unsigned intdefine uchar unsigned charsbit rs=P3^0。sbit e=P3^1。sbit start=P2^0。sbit out=P2^2。sbit ale=P2^3。sbit key1=P3^4。sbit key2=P3^5。sbit key3=P3^6。uchar num=1,flag=0。uint ad_data。void delay(uchar ms) //延時(shí)子函數(shù){ uchar j,i。 for(i=ms。i0。i) for(j=110。j0。j)。}void key_scan(){ if(key1==0) { delay(10)。 //消抖延時(shí) if(key1==0) { num=1。 } while(key1==0) 。 } if(key2==0) { delay(10)。 //消抖延時(shí) if(key2==0) { num=2。 } while(key2==0) 。 } if(key3==0) { delay(10)。 //消抖延時(shí) if(key3==0) { num=3。 } while(key3==0) 。 }}void int0_init(){ EA=1。 IT0=1。 EX0=1。}void ad_transform(){ P2amp。=0x0f。////////////////////////////// delay(2)。 ale=0。 P2|=0x00+num*16。 //地址計(jì)算 delay(1)。 ale=1。 ale=0。 start=0。
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1