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

正文內(nèi)容

畢業(yè)論文-基于stc89c52單片機的可光控時控的太陽能燈設計(編輯修改稿)

2025-02-12 21:18 本頁面
 

【文章內(nèi)容簡介】 所示。 圖 431 效果圖 第五章 軟件 部分設計 在本次設計中,用到單片機最小系統(tǒng),時鐘 LCD 顯示部分。當夜幕降臨時,光敏電阻處于高阻狀態(tài)光控電路的三極管導通,驅(qū)動 LED燈串亮起。 DS1302是 一種高性能、低功耗、帶 RAM 的實 13 時時鐘電路,它可以對年、月、日、周日、時、分、秒進行計時,具有閏年補償功能 的 時鐘芯片,通過編程對主程序進行賦初值,也可通過按鍵來設置顯示的時間,單片機端口 根據(jù)查詢當前時間來對繼電器進行控制,繼而控制 LED燈串的亮滅 。 軟件程序流程圖如下所示: 第六章 總結(jié) 本次設計的靈感來源于寒假去實習的所在公司給的靈感,經(jīng)過一段時間的努力和奮斗, 設計總體實現(xiàn)了基本功能和最初的設計要求,由于經(jīng)費、時間和能力的限制,此次設計還有許多可以改進的地方。 致謝 本 設計 是在林順達 導師的指導 下順利完成的, 在整個設計的過程中給我們提供了不少良好的建議,讓本人受到了不小的 啟發(fā),使整個設計過程順利了許多。 還要感謝 同班的競佳同學,在程序方面給了我很大的幫助,由于有了同學和老師的幫 助,讓我在此次設計中少走了些彎路,才能比較順初始化 開始 時鐘芯片計時 LCD 顯示雙行時間 判斷是否所設置的關(guān)燈時間 單片機掃描讀取當前時間 給點平信號關(guān) 燈 否 是 14 利的完成設計, 在此謹向他們表示衷心的感謝。 參考文獻 [1] 楊寶柱 .太陽能燈的結(jié)構(gòu)與原理 [J].河北大學物理科學與技術(shù)學院 .2022年第 1期 . [2] 升壓 電路資料 . %B9%B5%E7%C2%B7pn=15. [3] 光控電路 . [4] bau72資料 . [5] bau72引腳圖 [6]李華 .MCS51 系列單片機實用接口技術(shù) [M].北京:北京航空航天大學出版社 ., 203228. [7] LCD1602資料 . [8] DS1302芯片 .資料 [9] 孫育才 .單片微型計算機及其應用 [M].東南大學出版社 .第 4版 .南京 :東南大學出版社 ,2022年 . [10] 江思敏,陳明 .Protel 電路設計教程 [M].清華大學出版社 .第 2版 .北京 :清華大學出版 . [11] 譚浩強 .C程序設計 [M].清華大學出版社 .第 3版 .北京:清華大學出版 . 英文摘要 Bsaed on MCU can lightactivated and Possession in Solar energy lamp The College of Physics and Information Engineering。 07 class electronics information science and technology 070303047 Cuihong Chen 15 faculty adviser Shunda Lin lecturer 【 Abstract】 With the development of society and economy, and now facing severe global environmental issues, new uncontaminated energy for the development and application of solar energy, much attention is one of mainly describes a simple but possession in solar energy stores the design and manufacture of LED lights. Hardware mainly include solar charging module, the power supply voltage module, singlechip microputer system booster module, display module, etc. Detailed analysis of the working principle of each part mainly by singlechip microputer DS1302 STC89C52 and clock chip to achieve some hardware circuit control and display function. 【 Key Words】 Solar LED lights; Lightactivated and possession in。 STC89C52。 附錄 程序 include define uchar unsigned char define uint unsigned int uchar code table5[]=20 。 uchar code table6[]= : : 。 uchar code table7[]=MON。 16 uchar code table8[]=TUE 。 uchar code table9[]=WED 。 uchar code table10[]=THR。 uchar code table11[]=FRI。 uchar code table12[]=SAT。 uchar code table13[]=SUN。 uchar code table14[]=set the time or 。 uchar code table15[]=voice 。 uchar code table16[]=set the bell。 uchar dd[7]。 uchar aa[7]={30,10,13,23,3,3,11}。 uchar ee[3]={13,12,0}。 char miao,fen,shi,ri,yue,zhou,nian。 uchar sw,gw。 uchar s1num,s2num。 sbit lcdrs=P3^7。 sbit lcdrw=P3^6。 sbit lcden=P3^5。 sbit RST=P1^7。 sbit SCLK=P1^5。 sbit IO=P1^6。 sbit s1=P2^7。 sbit s2=P2^6。 sbit s3=P2^5。 sbit s4=P2^4。 sbit P3_0=P3^0。 sbit deng=P2^0。 bit flag,flag3,flag6。 void delay(uint i) { uint j。 for(。i0。i) for(j=100。j0。j)。 } void delay1(uint num) { while( num ) 。 } void write_(uchar ) 17 { lcdrs=0。 lcden=0。 P1=。 delay(5)。 lcden=1。 delay(5)。 lcden=0。 } void write_data(uchar dat) { lcdrs=1。 lcden=0。 P1=dat。 delay(5)。 lcden=1。 delay(5)。 lcden=0。 } void init() { uchar num。 lcdrw=0。 write_(0x38)。 write_(0x0c)。 write_(0x06)。 write_(0x01)。 write_(0x80)。 write_(0x01)。 write_(0x80)。 for(num=0。num8。num++) { write_data(table5[num])。 delay(1)。 } write_(0xc0)。 for(num=0。num8。num++) { write_data(table6[num])。 delay(1)。 } 18 //自定義字符寫入 CGRAM } void DS1302_wbyte(uchar inbyte) { uchar i。 for(i=8。i0。i) { SCLK=0。 //寫的時候低電平改變數(shù)據(jù) if(inbyteamp。0x01) IO=1。 else IO=0。 SCLK=1。 //寫的時候高電平,把數(shù)據(jù)寫入 ds1302 delay1(1)。 inbyte=inbyte1。 } } uchar DS1302_rbyte() //sclk 的下跳沿讀數(shù)據(jù) { uchar i,temp=0。 IO=1。 //設置為輸入口 for(i=7。i0。i) { SCLK=0。 if(IO==1) temp=temp|0x80。 else temp=tempamp。0x7f。 SCLK=1。 //產(chǎn)生下跳沿 temp=temp1。 } return (temp)。 } //往 ds1302 的某個地址寫入數(shù)據(jù) void Write_DS1302(uchar cmd,uchar indata) { RST=1。 DS1302_wbyte(cmd)。 DS1302_wbyte(indata)。 RST=0。 SCLK=0。 } //讀 ds1302 某地址的的數(shù)據(jù) uchar Read_DS1302(uchar addr) 19 { uchar backdata。 RST=1。 DS1302_wbyte(addr)。 backdata=DS1302_rbyte()。//先寫地址,然后讀數(shù)據(jù) RST=0。 SCLK=0。 return (backdata)。 } //設置初始時間 void Set_DS1302(uchar addr,uchar *p,uchar n)//寫入 n 個數(shù)據(jù) {uchar bb。 Write_DS1302(0x8e,0x00)。//寫控制字,允許寫操作 for(。n0。n) {sw=(*p)/10。 gw=(*p)%10。 bb=(sw4)|gw。 Write_DS1302(addr,bb)。 p++。 addr=addr+2。 } Write_DS1302(0x8e,0x80)。//寫保護,不允許寫 } // 讀取當前時間 void Read_nowtime(uchar addr,uchar *p,uchar n) { for(。n0。n) { *p=Read_DS1302(addr)。 p++。 addr=addr+2。 } } void init_DS1302() { RST=0。 SCLK=0。 Write_DS1302(0x80,0x00)。//寫控制字,允許寫 Write_DS1302(0x90,0x00)。//禁止渦流充電 } void write_sfm(uchar add,uchar date) { 20 sw=date/10。 gw=date%10。 write_(0x80+0x40+add)。 write_data(0x30+sw)。 write_data(0x30+gw)。 } void write_nyr(uchar add,uchar date) { sw=date/10。 gw=date%10。 write_(0x80+add)。 write_data(0x30+sw)。 write_data(0x30+gw)。 } void write_zhou() { uchar num。 write_(0x80+11)。 switch(zhou) {case 1: for(num=0。num3。num++) { write_data(table7[num])。 delay(1)。 }。 break。 ca
點擊復制文檔內(nèi)容
黨政相關(guān)相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1