學會不畫電路圖,不用網絡表,用手工布線。從而加深對PCB電路版圖設計的理解。
標簽: PCB
上傳時間: 2013-11-06
上傳用戶:lyson
USB接口控制器參考設計,xilinx提供VHDL代碼 usb xilinx vhdl ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
上傳時間: 2013-10-29
上傳用戶:zhouchang199
注:1.這篇文章斷斷續續寫了很久,畫圖技術也不精,難免錯漏,大家湊合看.有問題可以留言. 2.論壇排版把我的代碼縮進全弄沒了,大家將代碼粘貼到arduino編譯器,然后按ctrl+T重新格式化代碼格式即可看的舒服. 一、什么是PWM PWM 即Pulse Wavelength Modulation 脈寬調制波,通過調整輸出信號占空比,從而達到改 變輸出平均電壓的目的。相信Arduino 的PWM 大家都不陌生,在Arduino Duemilanove 2009 中,有6 個8 位精度PWM 引腳,分別是3, 5, 6, 9, 10, 11 腳。我們可以使用analogWrite()控 制PWM 腳輸出頻率大概在500Hz 的左右的PWM 調制波。分辨率8 位即2 的8 次方等于 256 級精度。但是有時候我們會覺得6 個PWM 引腳不夠用。比如我們做一個10 路燈調光, 就需要有10 個PWM 腳。Arduino Duemilanove 2009 有13 個數字輸出腳,如果它們都可以 PWM 的話,就能滿足條件了。于是本文介紹用軟件模擬PWM。 二、Arduino 軟件模擬PWM Arduino PWM 調壓原理:PWM 有好幾種方法。而Arduino 因為電源和實現難度限制,一般 使用周期恒定,占空比變化的單極性PWM。 通過調整一個周期里面輸出腳高/低電平的時間比(即是占空比)去獲得給一個用電器不同 的平均功率。 如圖所示,假設PWM 波形周期1ms(即1kHz),分辨率1000 級。那么需要一個信號時間 精度1ms/1000=1us 的信號源,即1MHz。所以說,PWM 的實現難點在于需要使用很高頻的 信號源,才能獲得快速與高精度。下面先由一個簡單的PWM 程序開始: const int PWMPin = 13; int bright = 0; void setup() { pinMode(PWMPin, OUTPUT); } void loop() { if((bright++) == 255) bright = 0; for(int i = 0; i < 255; i++) { if(i < bright) { digitalWrite(PWMPin, HIGH); delayMicroseconds(30); } else { digitalWrite(PWMPin, LOW); delayMicroseconds(30); } } } 這是一個軟件PWM 控制Arduino D13 引腳的例子。只需要一塊Arduino 即可測試此代碼。 程序解析:由for 循環可以看出,完成一個PWM 周期,共循環255 次。 假設bright=100 時候,在第0~100 次循環中,i 等于1 到99 均小于bright,于是輸出PWMPin 高電平; 然后第100 到255 次循環里面,i 等于100~255 大于bright,于是輸出PWMPin 低電平。無 論輸出高低電平都保持30us。 那么說,如果bright=100 的話,就有100 次循環是高電平,155 次循環是低電平。 如果忽略指令執行時間的話,這次的PWM 波形占空比為100/255,如果調整bright 的值, 就能改變接在D13 的LED 的亮度。 這里設置了每次for 循環之后,將bright 加一,并且當bright 加到255 時歸0。所以,我們 看到的最終效果就是LED 慢慢變亮,到頂之后然后突然暗回去重新變亮。 這是最基本的PWM 方法,也應該是大家想的比較多的想法。 然后介紹一個簡單一點的。思維風格完全不同。不過對于驅動一個LED 來說,效果與上面 的程序一樣。 const int PWMPin = 13; int bright = 0; void setup() { pinMode(PWMPin, OUTPUT); } void loop() { digitalWrite(PWMPin, HIGH); delayMicroseconds(bright*30); digitalWrite(PWMPin, LOW); delayMicroseconds((255 - bright)*30); if((bright++) == 255) bright = 0; } 可以看出,這段代碼少了一個For 循環。它先輸出一個高電平,然后維持(bright*30)us。然 后輸出一個低電平,維持時間((255-bright)*30)us。這樣兩次高低就能完成一個PWM 周期。 分辨率也是255。 三、多引腳PWM Arduino 本身已有PWM 引腳并且運行起來不占CPU 時間,所以軟件模擬一個引腳的PWM 完全沒有實用意義。我們軟件模擬的價值在于:他能將任意的數字IO 口變成PWM 引腳。 當一片Arduino 要同時控制多個PWM,并且沒有其他重任務的時候,就要用軟件PWM 了。 多引腳PWM 有一種下面的方式: int brights[14] = {0}; //定義14個引腳的初始亮度,可以隨意設置 int StartPWMPin = 0, EndPWMPin = 13; //設置D0~D13為PWM 引腳 int PWMResolution = 255; //設置PWM 占空比分辨率 void setup() { //定義所有IO 端輸出 for(int i = StartPWMPin; i <= EndPWMPin; i++) { pinMode(i, OUTPUT); //隨便定義個初始亮度,便于觀察 brights[ i ] = random(0, 255); } } void loop() { //這for 循環是為14盞燈做漸亮的。每次Arduino loop()循環, //brights 自增一次。直到brights=255時候,將brights 置零重新計數。 for(int i = StartPWMPin; i <= EndPWMPin; i++) { if((brights[i]++) == PWMResolution) brights[i] = 0; } for(int i = 0; i <= PWMResolution; i++) //i 是計數一個PWM 周期 { for(int j = StartPWMPin; j <= EndPWMPin; j++) //每個PWM 周期均遍歷所有引腳 { if(i < brights[j])\ 所以我們要更改PWM 周期的話,我們將精度(代碼里面的變量:PWMResolution)降低就行,比如一般調整LED 亮度的話,我們用64 級精度就行。這樣速度就是2x32x64=4ms。就不會閃了。
上傳時間: 2013-10-23
上傳用戶:mqien
In today’s IT environment, Java is a leading technology in the world of enterprise development. As management demands more from technology, complexity in infrastructure seems to grow exponentially, leaving many unable to keep up with the demands of such a fast-paced world. These complexities can be seen in the over-evolving Java 2 Enterprise Edition (J2EE) specifications. This unnecessary complexity drove us to discover ways of simplifying development.
標簽: environment development enterprise technology
上傳時間: 2013-12-24
上傳用戶:Zxcvbnm
21天學會用JAVA開發網絡游戲 書籍語言: 簡體中文 書籍類型: 程序設計 授權方式: 免費軟件 書籍大小: 287 KB 書籍等級: 整理時間: 2004-11-3 20:41:10 With all of the media attention that is focused on the Internet and the World Wide Web, figuring out exactly what they are all about is sometimes difficult. Are they just a neat new way to market products or will they truly offer us a new medium of communication that will someday surpass even televisions and telephones? The answer is, who knows? Unfortunately, the ultimate use for the Internet is still unknown. This is because it is still in such a state of flux that it s pretty much impossible to accurately predict where it will end up. However, you can look at the evidence of what is there now and gain some insight into what the Internet might become, at least in terms of games.
上傳時間: 2013-12-20
上傳用戶:天誠24
The code is fairly straightforward, except perhaps for the call to convertColumnIndexToModel. That call is necessary because if the user moves the columns around, the view s index for the column doesn t match the model s index for the column. For example, the user might drag the Vegetarian column (which the model considers to be at index 4) so it s displayed as the first column — at view index 0. Since prepareRenderer gives us the view index, we need to translate the view index to a model index so we can be sure we re dealing with the intended column
標簽: convertColumnIndexToModel straightforward perhaps fairly
上傳時間: 2013-12-10
上傳用戶:it男一枚
fs44b0x_usb -- usb 測試程序 PC機部分的軟件 1) LEDDEMO -- 控制 FS44B0X板上三個LED的程序 2) D12_DRIVER_FOR_WIN98 -- USB芯片WIN98的驅動程序 3) D12_DRIVER_FOR_WINXP -- USB芯片WINXP的驅動程序 FS44B0X板的USB固件程序--源代碼 USB_DEMO 使用方法: 1)在SDT2.51里調入usb_demo.axf, 運行。 2)接上usb電纜,安裝win98的d12驅動程序(或者winxp的d12驅動程序) 3) 運行 LEDDEMO ,用鼠標點擊led1, led2, led3,可以看到FS44B0X板上三個LED亮滅。
標簽: DRIVER_FOR_WIN LEDDEMO x_usb 44
上傳時間: 2014-01-19
上傳用戶:李夢晗
Expert Choice represents a significant contribution to the decision making process 工t assists a decision maker in solving complex problems involving many criteria and several courses of action . An Expert Choice solution to a problem reflects the expertise of the decision maker , not the computer . Behavioral scientists have spent many years studying the human mind and how it makes decisions . They have found that humans are influenced by their previous experiences and this causes them to have biases . Basic instincts , preferences and environmental factors also play key roles in how we analyze data and make decisions . There 15 way to remove these factors from human decision making , nor would we necessarily want to , but as the problems of our world become more and more complex , it 15 necessary for us to employ a framework to help make more logical and less biased decisions while still taking our feelings and intuition into consideration .
標簽: contribution significant represents decision
上傳時間: 2015-06-02
上傳用戶:gmh1314
紅外線遙控器讀碼軟件,顯示紅外線波型,讀取并保存碼 IR Remote Control Unit Code Read System 產品詳細描述: 能夠像顯示器一樣顯示紅外線碼的波型 可以讀多達150種格式的紅外線碼 顯示紅外線碼的時間非常準確,誤差只有幾個微秒。 具有錯誤檢測功能 保存紅外線碼功能 自動識別碼的格式 比較樣機與所寫的新軟件的遙控器碼的異同 具體情況請訪問本網站:http://www.crzman.com/IR_Reader.htm Display the Infrared wave on the software like oscillograph. Can read more than 150 kinds of infrared code format Display the Infrared time and the tolerance no more than many us. Have error detect function Save Infrared code function Auto identify code s format Compare the code from sample and new Remote Control Unit code) Detail instance please visit address: http://www.crzman.com/IR_Reader.htm
上傳時間: 2015-07-03
上傳用戶:ccclll
用delphi編的,很精確的定時,精確度可以少于us.
標簽: delphi
上傳時間: 2015-07-11
上傳用戶:qweqweqwe