三種方法讀取鍵值 使用者設計行列鍵盤介面,一般常採用三種方法讀取鍵值。 中斷式 在鍵盤按下時產生一個外部中斷通知CPU,並由中斷處理程式通過不同位址讀資料線上的狀態判斷哪個按鍵被按下。 本實驗採用中斷式實現使用者鍵盤介面。 掃描法 對鍵盤上的某一行送低電位,其他為高電位,然後讀取列值,若列值中有一位是低,表明該行與低電位對應列的鍵被按下。否則掃描下一行。 反轉法 先將所有行掃描線輸出低電位,讀列值,若列值有一位是低表明有鍵按下;接著所有列掃描線輸出低電位,再讀行值。 根據讀到的值組合就可以查表得到鍵碼。4x4鍵盤按4行4列組成如圖電路結構。按鍵按下將會使行列連成通路,這也是見的使用者鍵盤設計電路。 //-----------4X4鍵盤程序--------------// uchar keboard(void) { uchar xxa,yyb,i,key; if((PINC&0x0f)!=0x0f) //是否有按鍵按下 {delayms(1); //延時去抖動 if((PINC&0x0f)!=0x0f) //有按下則判斷 { xxa=~(PINC|0xf0); //0000xxxx DDRC=0x0f; PORTC=0xf0; delay_1ms(); yyb=~(PINC|0x0f); //xxxx0000 DDRC=0xf0; //復位 PORTC=0x0f; while((PINC&0x0f)!=0x0f) //按鍵是否放開 { display(data); } i=4; //計算返回碼 while(xxa!=0) { xxa=xxa>>1; i--; } if(yyb==0x80) key=i; else if(yyb==0x40) key=4+i; else if(yyb==0x20) key=8+i; else if(yyb==0x10) key=12+i; return key; //返回按下的鍵盤碼 } } else return 17; //沒有按鍵按下 }
上傳時間: 2013-11-12
上傳用戶:a673761058
無線感測器已變得越來越普及,短期內其開發和部署數量將急遽增加。而無線通訊技術的突飛猛進,也使得智慧型網路中的無線感測器能夠緊密互連。此外,系統單晶片(SoC)的密度不斷提高,讓各式各樣的多功能、小尺寸無線感測器系統相繼問市。儘管如此,工程師仍面臨一個重大的挑戰:即電源消耗。
上傳時間: 2013-10-30
上傳用戶:wojiaohs
特點 精確度0.1%滿刻度 ±1位數 可量測 交直流電流/交直流電壓/電位計/傳送器/Pt-100/荷重元/電阻 等信號 顯示范圍-1999-9999可任意規劃 具有異常值與異常次數記錄保留功能 異常信號過高或過低或范圍內或范圍外檢測可任意設定 報警繼電器復歸方式可任意設定 尺寸小,穩定性高 2.主要規格 精確度: 0.1% F.S. ±1 digit 0.2% F.S. ±1 digit(AC) 取樣時間: 16 cycles/sec. 顯示值范圍: -1999 - +9999 digit adjustable 啟動延遲動作時間: 0-99.9 second adjustable 繼電器延遲動作時間: 0-99.9 second adjustable 繼電器復歸方式: Manual (N) / latch(L) can be modified 繼電器動作方向: HI /LO/GO/HL can be modified 繼電器容量: AC 250V-5A, DC 30V-7A 過載顯示: "doFL" 溫度系數: 50ppm/℃ (0-50℃) 顯示幕: Red high efficiency LEDs high 14.22mm(.56")(PV) Red high efficiency LEDs high 7.0mm(.276")(NO) 參數設定方式: Touch switches 記憶型式 : Non-volatile E2PROM memory 絕緣耐壓能力: 2KVac/1 min. (input/output/power) 1600Vdc(input/output 使用環境條件 : 0-50℃(20 to 90% RH non-condensed) 存放環境條件: 0-70℃(20 to 90% RH non-condensed) CE認證: EN 55022:1998/A1:2000 Class A EN 61000-3-2:2000 EN 61000-3-3:1995/A1:2001 EN 55024:1998/A1:2001
上傳時間: 2013-11-02
上傳用戶:fandeshun
特點 最高輸入頻率 10KHz 計數速度 50/10000脈波/秒可選擇 四種輸入模式可選擇(加算,減算,加減算,90度相位差加減算) 90度相位差加減算具有提高解析度4倍功能 輸入脈波具有預設刻度功能 前置量設定功能(二段設定)可選擇 數位化指撥設定操作簡易 計數暫時停止功能 3組報警功能 2:主要規格 脈波輸入型式: Jump-pin selectable current sourcing(NPN) or current sinking (PNP) 脈波觸發電位: HI bias (CMOS) (VIH=7.5V, VIL=5.5V) LO bias (TTL) (VIH=3.7V, VIL=2.0V) 最高輸入頻率: <10KHz (up,down,up/down mode) <5KHz (quadrature mode) 輸出動作時間 : 0.1 to 99.9 second adjustable 輸出復歸方式: Manual(N) or automatic (R or C) can be modif 繼電器容量: AC 250V-5A, DC 30V-7A 顯示值范圍: -199999 to 999999 顯示幕: Red high efficiency LEDs high 9.2mm (.36") 參數設定方式: Touch switches 感應器電源: 12VDC +/-3%(<60mA) ( 感應器電源 ) 記憶方式: Non-volatile E2PROM memory 絕緣耐壓能力: 2KVac/1 min. (input/output/power) 1600Vdc (input/output) 使用環境條件: 0-50℃(20 to 90% RH non-condensed) 存放環境條件: 0-70℃(20 to 90% RH non-condensed) CE認證: EN 55022:1998/A1:2000 Class A EN 61000-3-2:2000 EN 61000-3-3:1995/A1:2001 EN 55024:1998/A1:2001
上傳時間: 2013-11-12
上傳用戶:909000580
特點 精確度0.1%滿刻度 可輸入交直流電流/交直流電壓/電位計/傳送器...等信號 16 BIT類比輸出功能 輸入與輸出絕緣耐壓2仟伏特/1分鐘 寬范圍交直流兩用電源設計 尺寸小,穩定性高 2主要規格 精確度: 0.1% F.S. (23 ±5℃) 顯示值范圍: 0-±19999 digit adjustable 類比輸出解析度: 16 bit DAC 輸出反應速度: < 250 ms (0-90%)(>10Hz) 輸出負載能力: < 10mA for voltage mode < 10V for current mode 輸出之漣波: < 0.1% F.S. 歸零調整范圍: 0- ±9999 Digit adjustable 最大值調整范圍: 0- ±9999 Digit adjustable 溫度系數: 50ppm/℃ (0-50℃) 顯示幕: Red high efficiency LEDs high 10.16mm (0.4") 隔離特性: Input/Output/Power/Case 參數設定方式: Touch switches 記憶方式: Non-volatile E2PROM memory 絕緣抗阻: >100Mohm with 500V DC 絕緣耐壓能力: 2KVac/1 min. (input/output/power) 1600Vdc (input/output) 使用環境條件: 0-60℃(20 to 90% RH non-condensed) 存放環境條件: 0-70℃(20 to 90% RH non-condensed) 安裝方式: Socket/plugin type with barrier terminals CE認證: EN 55022:1998/A1:2000 Class A EN 61000-3-2:2000 EN 61000-3-3:1995/A1:2001 EN 55024:1998/A1:2001
上傳時間: 2014-01-05
上傳用戶:eastgan
特點 精確度0.05%滿刻度 ±1位數 顯示范圍-19999-99999可任意規劃 可直接量測直流4至20mA電流,無需另接輔助電源 尺寸小(24x48x50mm),穩定性高 分離式端子,配線容易 CE 認證 主要規格 輔助電源: None 精確度: 0.05% F.S. ±1 digit(DC) 輸入抗阻: approx. 250 ohm with 20mA input 輸入電壓降: max. DC5V with 20mA input 最大過載能力: < ±50mA 取樣時間: 2.5 cycles/sec. 顯示值范圍: -19999 - 99999 digit adjustable 歸零調整范圍: -999-999 digit adjustable 最大值調整范圍: -999-999 digit adjustable 過載顯示: " doFL " or "-doFL" 極性顯示: " 一 " for negative readings 顯示幕 : Brigh Red LEDs high 8.6mm(.338") 溫度系數 : 50ppm/℃ (0-50℃) 參數設定方式: Touch switches 記憶型式: Non-volatile E2 外殼材料: ABS 絕緣耐壓能力: 2KVac/1 min. (input/case) 使用環境條件: 0-50℃(20 to 90% RH non-condensed) 存放環境條件: 0-70℃(20 to 90% RH non-condensed) 外型尺寸: 24x48x50mm CE認證: EN 55022:1998/A1:2000 Class A EN 61000-3-2:2000 EN 61000-3-3:1995/A1:2001 EN 55024:1998/A1:2001
上傳時間: 2013-10-09
上傳用戶:lhuqi
一種基于ATmega16和FC222-CH的無線水位檢測系統。該系統由無線通信模塊、電源模塊、AD轉換模塊、上位機模塊組成,實現了水位的無線檢測、運行故障報警等功能,并配以自行設計的LabVIEW 8.5上位機顯示界面,使整套開發系統兼備可視化與實時性的雙重要求。
上傳時間: 2014-12-29
上傳用戶:agent
本文將探討微控制器與 PSoC (可編程系統單晶片)在數位電視應用上的設計挑戰,並比較微控制器和 PSoC 架構在處理這些挑戰時的不同處,以有效地建置執行。
上傳時間: 2013-11-22
上傳用戶:gengxiaochao
Single-Ended and Differential S-Parameters Differential circuits have been important incommunication systems for many years. In the past,differential communication circuits operated at lowfrequencies, where they could be designed andanalyzed using lumped-element models andtechniques. With the frequency of operationincreasing beyond 1GHz, and above 1Gbps fordigital communications, this lumped-elementapproach is no longer valid, because the physicalsize of the circuit approaches the size of awavelength.Distributed models and analysis techniques are nowused instead of lumped-element techniques.Scattering parameters, or S-parameters, have beendeveloped for this purpose [1]. These S-parametersare defined for single-ended networks. S-parameterscan be used to describe differential networks, but astrict definition was not developed until Bockelmanand others addressed this issue [2]. Bockelman’swork also included a study on how to adapt single-ended S-parameters for use with differential circuits[2]. This adaptation, called “mixed-mode S-parameters,” addresses differential and common-mode operation, as well as the conversion betweenthe two modes of operation.This application note will explain the use of single-ended and mixed-mode S-parameters, and the basicconcepts of microwave measurement calibration.
上傳時間: 2014-03-25
上傳用戶:yyyyyyyyyy
徹底解決99在以往不能完全漢化的問題,全面實現漢化,具體到每個對話框和工作表,對初學者和英文不好的用戶非常實用,也非常簡單! 用過的,麻煩頂一下我,或加一點分,謝謝啦!
上傳時間: 2013-10-24
上傳用戶:小眼睛LSL