亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

蟲蟲首頁| 資源下載| 資源專輯| 精品軟件
登錄| 注冊

Low-LEVEL

  • 基于(英蓓特)STM32V100的串口程序

    This example provides a description of how  to use the USART with hardware flowcontrol and communicate with the Hyperterminal.First, the USART2 sends the TxBuffer to the hyperterminal and still waiting fora string from the hyperterminal that you must enter which must end by '\r'character (keypad ENTER button). Each byte received is retransmitted to theHyperterminal. The string that you have entered is stored in the RxBuffer array. The receivebuffer have a RxBufferSize bytes as maximum. The USART2 is configured as follow:    - BaudRate = 115200 baud      - Word Length = 8 Bits    - One Stop Bit    - No parity    - Hardware flow control enabled (RTS and CTS signals)    - Receive and transmit enabled    - USART Clock disabled    - USART CPOL: Clock is active low    - USART CPHA: Data is captured on the second edge     - USART LastBit: The clock pulse of the last data bit is not output to                      the SCLK pin

    標簽: V100 STM 100 32V

    上傳時間: 2013-10-31

    上傳用戶:yy_cn

  • Arduino學習筆記4_Arduino軟件模擬PWM

    注: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。就不會閃了。

    標簽: Arduino PWM 軟件模擬

    上傳時間: 2013-10-08

    上傳用戶:dingdingcandy

  • Arduino應用_Arduino連接超聲波傳感器測距

    超聲波傳感器適用于對大幅的平面進行靜止測距。普通的超聲波傳感器測距范圍大概是 2cm~450cm,分辨率3mm(淘寶賣家說的,筆者測試環境沒那么好,個人實測比較穩定的 距離10cm~2m 左右,超過此距離就經常有偶然不準確的情況發生了,當然不排除筆者技術 問題。) 測試對象是淘寶上面最便宜的SRF-04 超聲波傳感器,有四個腳:5v 電源腳(Vcc),觸發控制端(Trig),接收端(Echo),地端(GND) 附:SRF 系列超聲波傳感器參數比較   模塊工作原理: 采用IO 觸發測距,給至少10us 的高電平信號; 模塊自動發送8個40KHz 的方波,自動檢測是否有信號返回; 有信號返回,通過IO 輸出一高電平,高電平持續的時間就是超聲波從發射到返回的時間.測試距離=(高電平時間*聲速(340m/s))/2; 電路連接方法   Arduino 程序例子: constintTrigPin = 2; constintEchoPin = 3; floatcm; voidsetup() { Serial.begin(9600); pinMode(TrigPin, OUTPUT); pinMode(EchoPin, INPUT); } voidloop() { digitalWrite(TrigPin, LOW); //低高低電平發一個短時間脈沖去TrigPin delayMicroseconds(2); digitalWrite(TrigPin, HIGH); delayMicroseconds(10); digitalWrite(TrigPin, LOW); cm = pulseIn(EchoPin, HIGH) / 58.0; //將回波時間換算成cm cm = (int(cm * 100.0)) / 100.0; //保留兩位小數 Serial.print(cm); Serial.print("cm"); Serial.println(); delay(1000); }

    標簽: Arduino 連接 超聲波傳感器

    上傳時間: 2013-10-18

    上傳用戶:星仔

  • SMT常用術語之中英文對比

      AI :Auto-Insertion 自動插件   AQL :acceptable quality level 允收水準   ATE :automatic test equipment 自動測試   ATM :atmosphere 氣壓   BGA :ball grid array 球形矩陣

    標簽: SMT 術語 中英文 對比

    上傳時間: 2013-11-20

    上傳用戶:haoxiyizhong

  • Xilinx UltraScale:新一代架構滿足您的新一代架構需求(EN)

      中文版詳情瀏覽:http://www.elecfans.com/emb/fpga/20130715324029.html   Xilinx UltraScale:The Next-Generation Architecture for Your Next-Generation Architecture    The Xilinx® UltraScale™ architecture delivers unprecedented levels of integration and capability with ASIC-class system- level performance for the most demanding applications.   The UltraScale architecture is the industr y's f irst application of leading-edge ASIC architectural enhancements in an All Programmable architecture that scales from 20 nm planar through 16 nm FinFET technologies and beyond, in addition to scaling from monolithic through 3D ICs. Through analytical co-optimization with the X ilinx V ivado® Design Suite, the UltraScale architecture provides massive routing capacity while intelligently resolving typical bottlenecks in ways never before possible. This design synergy achieves greater than 90% utilization with no performance degradation.   Some of the UltraScale architecture breakthroughs include:   • Strategic placement (virtually anywhere on the die) of ASIC-like system clocks, reducing clock skew by up to 50%    • Latency-producing pipelining is virtually unnecessary in systems with massively parallel bus architecture, increasing system speed and capability   • Potential timing-closure problems and interconnect bottlenecks are eliminated, even in systems requiring 90% or more resource utilization   • 3D IC integration makes it possible to build larger devices one process generation ahead of the current industr y standard    • Greatly increased system performance, including multi-gigabit serial transceivers, I/O, and memor y bandwidth is available within even smaller system power budgets   • Greatly enhanced DSP and packet handling   The Xilinx UltraScale architecture opens up whole new dimensions for designers of ultra-high-capacity solutions.

    標簽: UltraScale Xilinx 架構

    上傳時間: 2013-11-21

    上傳用戶:wxqman

  • PCB Design Considerations and Guidelines for 0.4mm and 0.5mm WLPs

    Abstract: Using a wafer-level package (WLP) can reduce the overall size and cost of your solution.However when using a WLP IC, the printed circuit board (PCB) layout can become more complex and, ifnot carefully planned, result in an unreliable design. This article presents some PCB designconsiderations and general recommendations for choosing a 0.4mm- or 0.5mm-pitch WLP for yourapplication.

    標簽: Considerations Guidelines and Design

    上傳時間: 2013-11-09

    上傳用戶:ls530720646

  • 使用Artix-7 FPGA 降低您的系統功耗與成本

    As businesses and consumers expect more fromportable electronics, the FPGA industry has beencompelled to re-think how it serves these low-power,cost-sensitive markets. Application classes like

    標簽: Artix FPGA 功耗

    上傳時間: 2013-11-08

    上傳用戶:immanuel2006

  • Create a 1-Wire Master with Xilinx PicoBlaze

    Abstract: Designers who must interface 1-Wire temperature sensors with Xilinx field-programmable gate arrays(FPGAs) can use this reference design to drive a DS28EA00 1-Wire slave device. The downloadable softwarementioned in this document can also be used as a starting point to connect other 1-Wire slave devices. The systemimplements a 1-Wire master connected to a UART and outputs temperature to a PC from the DS28EA00 temperaturesensor. In addition, high/low alarm outputs are displayed from the DS28EA00 PIO pins using LEDs.

    標簽: PicoBlaze Create Master Xilinx

    上傳時間: 2013-11-12

    上傳用戶:大三三

  • Verilog_HDL的基本語法詳解(夏宇聞版)

            Verilog_HDL的基本語法詳解(夏宇聞版):Verilog HDL是一種用于數字邏輯電路設計的語言。用Verilog HDL描述的電路設計就是該電路的Verilog HDL模型。Verilog HDL既是一種行為描述的語言也是一種結構描述的語言。這也就是說,既可以用電路的功能描述也可以用元器件和它們之間的連接來建立所設計電路的Verilog HDL模型。Verilog模型可以是實際電路的不同級別的抽象。這些抽象的級別和它們對應的模型類型共有以下五種:   系統級(system):用高級語言結構實現設計模塊的外部性能的模型。   算法級(algorithm):用高級語言結構實現設計算法的模型。   RTL級(Register Transfer Level):描述數據在寄存器之間流動和如何處理這些數據的模型。   門級(gate-level):描述邏輯門以及邏輯門之間的連接的模型。   開關級(switch-level):描述器件中三極管和儲存節點以及它們之間連接的模型。   一個復雜電路系統的完整Verilog HDL模型是由若干個Verilog HDL模塊構成的,每一個模塊又可以由若干個子模塊構成。其中有些模塊需要綜合成具體電路,而有些模塊只是與用戶所設計的模塊交互的現存電路或激勵信號源。利用Verilog HDL語言結構所提供的這種功能就可以構造一個模塊間的清晰層次結構來描述極其復雜的大型設計,并對所作設計的邏輯電路進行嚴格的驗證。   Verilog HDL行為描述語言作為一種結構化和過程性的語言,其語法結構非常適合于算法級和RTL級的模型設計。這種行為描述語言具有以下功能:   · 可描述順序執行或并行執行的程序結構。   · 用延遲表達式或事件表達式來明確地控制過程的啟動時間。   · 通過命名的事件來觸發其它過程里的激活行為或停止行為。   · 提供了條件、if-else、case、循環程序結構。   · 提供了可帶參數且非零延續時間的任務(task)程序結構。   · 提供了可定義新的操作符的函數結構(function)。   · 提供了用于建立表達式的算術運算符、邏輯運算符、位運算符。   · Verilog HDL語言作為一種結構化的語言也非常適合于門級和開關級的模型設計。因其結構化的特點又使它具有以下功能:   - 提供了完整的一套組合型原語(primitive);   - 提供了雙向通路和電阻器件的原語;   - 可建立MOS器件的電荷分享和電荷衰減動態模型。   Verilog HDL的構造性語句可以精確地建立信號的模型。這是因為在Verilog HDL中,提供了延遲和輸出強度的原語來建立精確程度很高的信號模型。信號值可以有不同的的強度,可以通過設定寬范圍的模糊值來降低不確定條件的影響。   Verilog HDL作為一種高級的硬件描述編程語言,有著類似C語言的風格。其中有許多語句如:if語句、case語句等和C語言中的對應語句十分相似。如果讀者已經掌握C語言編程的基礎,那么學習Verilog HDL并不困難,我們只要對Verilog HDL某些語句的特殊方面著重理解,并加強上機練習就能很好地掌握它,利用它的強大功能來設計復雜的數字邏輯電路。下面我們將對Verilog HDL中的基本語法逐一加以介紹。

    標簽: Verilog_HDL

    上傳時間: 2014-12-04

    上傳用戶:cppersonal

  • 《器件封裝用戶向導》賽靈思產品封裝資料

    Introduction to Xilinx Packaging Electronic packages are interconnectable housings for semiconductor devices. The major functions of the electronic packages are to provide electrical interconnections between the IC and the board and to efficiently remove heat generated by the device. Feature sizes are constantly shrinking, resulting in increased number of transistors being packed into the device. Today's submicron technology is also enabling large-scale functional integration and system-on-a-chip solutions. In order to keep pace with these new advancements in silicon technologies, semiconductor packages have also evolved to provide improved device functionality and performance. Feature size at the device level is driving package feature sizes down to the design rules of the early transistors. To meet these demands, electronic packages must be flexible to address high pin counts, reduced pitch and form factor requirements. At the same time,packages must be reliable and cost effective.

    標簽: 封裝 器件 用戶 賽靈思

    上傳時間: 2013-11-21

    上傳用戶:不懂夜的黑

主站蜘蛛池模板: 镇巴县| 文成县| 日喀则市| 明水县| 三穗县| 六盘水市| 阜宁县| 集安市| 灵璧县| 博罗县| 彰化县| 昌黎县| 奉贤区| 西乌| 密山市| 大丰市| 揭阳市| 勐海县| 芜湖市| 宽甸| 扶余县| 开封市| 辰溪县| 临武县| 大荔县| 巴里| 大庆市| 农安县| 彰化市| 永川市| 自治县| 阿克苏市| 芮城县| 盈江县| 麻城市| 金塔县| 鲁山县| 曲松县| 晋江市| 独山县| 贞丰县|