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

正文內(nèi)容

基于pwm調(diào)光的智能多功能臺(tái)燈設(shè)計(jì)畢業(yè)設(shè)計(jì)論文(留存版)

2025-01-22 01:55上一頁面

下一頁面
  

【正文】 按鍵組成,分別為 S2時(shí)間設(shè)置鍵、 S3數(shù)值增大鍵、 S4數(shù)值減小鍵、 S5鬧鐘設(shè)置鍵以及 S6亮度調(diào)節(jié)鍵。調(diào)試的時(shí)候,硬件基本上沒多大問題,重點(diǎn)在于軟件程序方面。 TH0 = 0。x。 //550 us DQ=1。_nop_()。 _nop_()。 //發(fā)命令 _18B20_write(0x44)。 // 取小數(shù)部分的值 _1820display[0]=ditab[_1820display[4]]。39。 LCD_DATA=wdata。y3。 WriteDataLcd(dat)。 //done:1:進(jìn)入調(diào)整模式 ,0:正常模式 //count 切換閃爍位 (位置變量 ) //temp: 閃爍位變量值 //up,downflag: 按鍵加減標(biāo)志位 //hideflag:控制閃爍頻率 char hide_sec,hide_min,hide_hour,hide_day,hide_week,hide_month,hide_year。 //定義時(shí)間類型 SYSTEMTIME CurrentTime。 } return(ACC)。 return(ucData)。 ReadValue = Read1302(DS1302_YEAR)。 //禁止寫入 } } /****************將時(shí)間年月日星期轉(zhuǎn)換成液晶顯示字符串,放到數(shù)組 **************/ void DateToStr(SYSTEMTIME *Time) { if(hide_yearhideflag/2) //這里的 if,else 語句都是判斷位閃爍,大于hideflag/2 則顯示數(shù)據(jù),反之; 2020/07/22 { TimeDateString[0] = 39。 } TimeDateString[4] = 0x02。 TimeDateString[9] = 39。 39。039。 //顯示時(shí)間 display_string(0,0,)。 if(out==0) { delay(8)。0x7f)0x59) //超過 59 秒,清零 temp=0。 case 4: temp=Read1302(DS1302_WEEK)。 temp++。 switch(count) {case 1: temp=Read1302(DS1302_SECOND)。 temp。 if(temp==1) temp=0x59。 default:break。 if(temp0x31) //超過 31 天,清零 temp=1。 //小時(shí)加一 DB(temp)。 switch(count) {case 1: temp=Read1302(DS1302_SECOND)。//顯示星期 display_char(15,0,39。CurrentTime)。 39。039。 TimeDateString[9] = TimeDay%10 + 39。 TimeDateString[2] = 39。 Write1302(DS1302_HOUR,0x20)。 ReadValue = Read1302(DS1302_WEEK)。 DS1302InputByte(ucAddr|0x01)。 i) { ACC = ACC 1。 unsigned char year。 //加法按鈕 sbit Down= P2^2。 //顯示開及光標(biāo)移動(dòng)設(shè)置 } /******************1602 的位置 *************************/ void display_xy(unsigned char x,unsigned char y) { if(y==1) x+=0x40。 } uchar code hanzi[4][8]= //中文漢字庫 { 0x1f,0x11,0x11,0x1f,0x11,0x11,0x1f,0x00, //日 0x0f,0x09,0x0f,0x09,0x0f,0x09,0x11,0x00, //月 0x08,0x0f,0x12,0x0f,0x0a,0x1f,0x02,0x02, //年 }。y0。39。 if(tem6348) // 溫度值正負(fù)判斷 { tem=65536tem。 return(value)。 _nop_()。 //從高拉到低 DQ=0。 _nop_()。 } } /****************************************************************/ /*延時(shí) /****************************************************************/ void delayms(unsigned int ms) { unsigned int x。 /* 時(shí)間緩沖區(qū) */ uint xdata TimeCount =0。一開始老師布置作業(yè)時(shí)我第一想到的是報(bào)警器,想著可以報(bào)警,做出來實(shí)用價(jià)值應(yīng)該會(huì)很大,可是后來我在晚上寫作業(yè)的時(shí)候用到臺(tái)燈,突然想到能不能做一個(gè)多功能的臺(tái)燈,這樣在寫作業(yè)時(shí)還可以有時(shí)間觀念,或者可以設(shè)個(gè)鬧鐘給自己提一下醒。注意,延時(shí)后,需要檢測(cè)一下干擾信號(hào)。 定時(shí)器中斷程序 為產(chǎn)生調(diào)節(jié) LED 燈光亮度的 PWM 信號(hào),定時(shí)器 T0設(shè)置為工作方式 0,即 13 位計(jì)數(shù)器定時(shí),最多裝載數(shù)值為 8192個(gè)。單片機(jī) 口通過 R3 連接 DQ 端口實(shí)現(xiàn)溫度數(shù)據(jù)的采集處理,并通過液晶屏實(shí)時(shí)顯示。當(dāng)高電平脈沖個(gè)數(shù)為 1 時(shí),占空比為 1/10,亮度最低,當(dāng) 在一個(gè)周期中 10 個(gè)脈沖全為高電平時(shí),占空比為 1, LED 亮度最高。 PWM 調(diào)光是可以直接應(yīng)用于調(diào)光型臺(tái)燈的 [5]。但是通常限流檢測(cè)電阻阻值非常小,用一個(gè)很小阻值的電位器來調(diào)節(jié)電流,操作起來很難實(shí)現(xiàn)電流調(diào)節(jié)。s lives . Previous use of a single lamp , and now people need a versatile intelligent lamp. So take advantage of the knowledge to design a multipurpose green lamp is a good direction. This paper describes the design of a lamp based intelligent PWM dimming . The microcontroller technology and PWM dimming technology bine to achieve a strong regulator station lights . Make use of software to change the duty cycle and thus to change the size of the voltage dimming . Using DS1302 clock chip and singlechip bination to generate time calendar. Using DS18B20 temperature detection chip to detect the ambient temperature. Character LCD with a 1602 chip to display the time , calendar , week, temperature, and light intensity lamp level .Make use of the buzzer and the alarm clock chip to generate timing . For the infrared control using HX1838 infrared that the lamp has a number of functions. Key words PWM dimming。普通電燈,白熾燈, LED 燈 , 這也反映了人類社會(huì)的進(jìn)步,科技的發(fā)展。 利用 HX1838紅外接收來進(jìn)行紅外控制。 3 用可控硅對(duì) LED 調(diào)光 [2]。因?yàn)?LED并不是一個(gè)純阻性的器件 。 PT4115是一款連續(xù)電感電流導(dǎo)通模式的降壓恒流源 IC,能將直流電壓直接轉(zhuǎn)換成穩(wěn)定的恒流輸出[4]。該液晶接口電 路如 下圖 所示。該線性穩(wěn)壓芯片正常工作輸入電壓與輸出電壓差值應(yīng)至少高于 2V,若差值過大會(huì)增加額外功耗。這樣,當(dāng)按下按鍵時(shí),紅外接收到信號(hào), IRIN 則發(fā)生從預(yù)先設(shè)置的高電平跳為低電平,從而產(chǎn)生中斷。此仿真結(jié)果說明電路和程序是可行的。//當(dāng)前 PWM 的定時(shí)器值 uchar xdata IRDATABUF[4]。 } } IRDATABUF[ i ] = IRDATA。t)。i) { DQ=1。 for(i=8。 //4 us if(DQ)value|=0x80。 temper=temper|temper_data[0]。039。 for(x=z。 LCD_E=1。 //光標(biāo)無 WriteCommandLcd(0x06)。 //時(shí)鐘端 sbit DS1302_IO = P1^6。 unsigned char YearL。 } } /***********************實(shí)時(shí)時(shí)鐘讀取一字節(jié) *******************/ uchar DS1302OutputByte(void) { unsigned char i。 DS1302_RST = 0。0x7F)。 //以下寫入初始化時(shí)間 23 Write1302(DS1302_MONTH,0x10)。 39。 } TimeDateString[7] = 0x01。 } week_value[1] = 39。 } else { TimeTimeString[3] = 39。 } /*********************液晶顯示函數(shù) ***********************/ void show_time() { DS1302_GetTime(amp。*39。 while(out==0)。 case 3: temp=Read1302(DS1302_HOUR)。 temp++。 up_flag=1。 temp。 if(temp==1) temp=0x23。 DB(temp)。 if(temp0x12) //超過 12 月,清零 temp=1。 //周數(shù)加一 DB(temp)。 //讀取分?jǐn)?shù) BD(temp)。 Second=Read1302(DS1302_SECOND)。 39。 } else { TimeTimeString[6] = 39。 } TimeTimeString[2] = 39。 TimeDateString[11] = 39。 TimeDateString[6] = TimeMonth%10 + 39。039。 TimeYearH = BCD2DEC(ReadValue)。 TimeSecond = BCD2DEC(ReadValueamp。 DS1302_RS
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1