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

蟲蟲首頁(yè)| 資源下載| 資源專輯| 精品軟件
登錄| 注冊(cè)

psuedo-Random

  • 低功耗測(cè)試矢量生成技術(shù)的研究

    在集成電路內(nèi)建自測(cè)試的過程中,電路的測(cè)試功耗通常顯著高于正常模式產(chǎn)生的功耗,因此低功耗內(nèi)建自測(cè)試技術(shù)已成為當(dāng)前的一個(gè)研究熱點(diǎn)。為了減少被測(cè)電路內(nèi)部節(jié)點(diǎn)的開關(guān)翻轉(zhuǎn)活動(dòng)率,研究了一種隨機(jī)單輸入跳變(Random Single Input Change,RSIC)測(cè)試向量生成器的設(shè)計(jì)方案,利用VHDL語(yǔ)言描述了內(nèi)建自測(cè)試結(jié)構(gòu)中的測(cè)試向量生成模塊,進(jìn)行了計(jì)算機(jī)模擬仿真并用FPGA(EP1C6Q240C8)加以硬件實(shí)現(xiàn)。實(shí)驗(yàn)結(jié)果證實(shí)了這種內(nèi)建自測(cè)試原理電路的正確性和有效性。

    標(biāo)簽: 低功耗測(cè)試 矢量 生成技術(shù)

    上傳時(shí)間: 2013-10-08

    上傳用戶:llwap

  • Arduino學(xué)習(xí)筆記4_Arduino軟件模擬PWM

    注:1.這篇文章斷斷續(xù)續(xù)寫了很久,畫圖技術(shù)也不精,難免錯(cuò)漏,大家湊合看.有問題可以留言.      2.論壇排版把我的代碼縮進(jìn)全弄沒了,大家將代碼粘貼到arduino編譯器,然后按ctrl+T重新格式化代碼格式即可看的舒服. 一、什么是PWM PWM 即Pulse Wavelength Modulation 脈寬調(diào)制波,通過調(diào)整輸出信號(hào)占空比,從而達(dá)到改 變輸出平均電壓的目的。相信Arduino 的PWM 大家都不陌生,在Arduino Duemilanove 2009 中,有6 個(gè)8 位精度PWM 引腳,分別是3, 5, 6, 9, 10, 11 腳。我們可以使用analogWrite()控 制PWM 腳輸出頻率大概在500Hz 的左右的PWM 調(diào)制波。分辨率8 位即2 的8 次方等于 256 級(jí)精度。但是有時(shí)候我們會(huì)覺得6 個(gè)PWM 引腳不夠用。比如我們做一個(gè)10 路燈調(diào)光, 就需要有10 個(gè)PWM 腳。Arduino Duemilanove 2009 有13 個(gè)數(shù)字輸出腳,如果它們都可以 PWM 的話,就能滿足條件了。于是本文介紹用軟件模擬PWM。 二、Arduino 軟件模擬PWM Arduino PWM 調(diào)壓原理:PWM 有好幾種方法。而Arduino 因?yàn)殡娫春蛯?shí)現(xiàn)難度限制,一般 使用周期恒定,占空比變化的單極性PWM。 通過調(diào)整一個(gè)周期里面輸出腳高/低電平的時(shí)間比(即是占空比)去獲得給一個(gè)用電器不同 的平均功率。 如圖所示,假設(shè)PWM 波形周期1ms(即1kHz),分辨率1000 級(jí)。那么需要一個(gè)信號(hào)時(shí)間 精度1ms/1000=1us 的信號(hào)源,即1MHz。所以說,PWM 的實(shí)現(xiàn)難點(diǎn)在于需要使用很高頻的 信號(hào)源,才能獲得快速與高精度。下面先由一個(gè)簡(jiǎn)單的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); } } } 這是一個(gè)軟件PWM 控制Arduino D13 引腳的例子。只需要一塊Arduino 即可測(cè)試此代碼。 程序解析:由for 循環(huán)可以看出,完成一個(gè)PWM 周期,共循環(huán)255 次。 假設(shè)bright=100 時(shí)候,在第0~100 次循環(huán)中,i 等于1 到99 均小于bright,于是輸出PWMPin 高電平; 然后第100 到255 次循環(huán)里面,i 等于100~255 大于bright,于是輸出PWMPin 低電平。無(wú) 論輸出高低電平都保持30us。 那么說,如果bright=100 的話,就有100 次循環(huán)是高電平,155 次循環(huán)是低電平。 如果忽略指令執(zhí)行時(shí)間的話,這次的PWM 波形占空比為100/255,如果調(diào)整bright 的值, 就能改變接在D13 的LED 的亮度。 這里設(shè)置了每次for 循環(huán)之后,將bright 加一,并且當(dāng)bright 加到255 時(shí)歸0。所以,我們 看到的最終效果就是LED 慢慢變亮,到頂之后然后突然暗回去重新變亮。 這是最基本的PWM 方法,也應(yīng)該是大家想的比較多的想法。 然后介紹一個(gè)簡(jiǎn)單一點(diǎn)的。思維風(fēng)格完全不同。不過對(duì)于驅(qū)動(dòng)一個(gè)LED 來(lái)說,效果與上面 的程序一樣。 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; } 可以看出,這段代碼少了一個(gè)For 循環(huán)。它先輸出一個(gè)高電平,然后維持(bright*30)us。然 后輸出一個(gè)低電平,維持時(shí)間((255-bright)*30)us。這樣兩次高低就能完成一個(gè)PWM 周期。 分辨率也是255。 三、多引腳PWM Arduino 本身已有PWM 引腳并且運(yùn)行起來(lái)不占CPU 時(shí)間,所以軟件模擬一個(gè)引腳的PWM 完全沒有實(shí)用意義。我們軟件模擬的價(jià)值在于:他能將任意的數(shù)字IO 口變成PWM 引腳。 當(dāng)一片Arduino 要同時(shí)控制多個(gè)PWM,并且沒有其他重任務(wù)的時(shí)候,就要用軟件PWM 了。 多引腳PWM 有一種下面的方式: int brights[14] = {0}; //定義14個(gè)引腳的初始亮度,可以隨意設(shè)置 int StartPWMPin = 0, EndPWMPin = 13; //設(shè)置D0~D13為PWM 引腳 int PWMResolution = 255; //設(shè)置PWM 占空比分辨率 void setup() { //定義所有IO 端輸出 for(int i = StartPWMPin; i <= EndPWMPin; i++) { pinMode(i, OUTPUT); //隨便定義個(gè)初始亮度,便于觀察 brights[ i ] = random(0, 255); } } void loop() { //這for 循環(huán)是為14盞燈做漸亮的。每次Arduino loop()循環(huán), //brights 自增一次。直到brights=255時(shí)候,將brights 置零重新計(jì)數(shù)。 for(int i = StartPWMPin; i <= EndPWMPin; i++) { if((brights[i]++) == PWMResolution) brights[i] = 0; } for(int i = 0; i <= PWMResolution; i++) //i 是計(jì)數(shù)一個(gè)PWM 周期 { for(int j = StartPWMPin; j <= EndPWMPin; j++) //每個(gè)PWM 周期均遍歷所有引腳 { if(i < brights[j])\   所以我們要更改PWM 周期的話,我們將精度(代碼里面的變量:PWMResolution)降低就行,比如一般調(diào)整LED 亮度的話,我們用64 級(jí)精度就行。這樣速度就是2x32x64=4ms。就不會(huì)閃了。

    標(biāo)簽: Arduino PWM 軟件模擬

    上傳時(shí)間: 2013-10-23

    上傳用戶:mqien

  • 假設(shè)你需要指定范圍內(nèi)的隨機(jī)數(shù)

    假設(shè)你需要指定范圍內(nèi)的隨機(jī)數(shù),傳統(tǒng)的方法是使用ANSI C的函數(shù)random(),然后格式化結(jié)果以便結(jié)果是落在指定的范圍內(nèi)。但是,使用這個(gè)方法至少有兩個(gè)缺點(diǎn)

    標(biāo)簽: 隨機(jī)數(shù)

    上傳時(shí)間: 2014-01-14

    上傳用戶:youke111

  • java語(yǔ)言中的系統(tǒng)類

    java語(yǔ)言中的系統(tǒng)類,包括String類、 StringBuffer類、 Vector類、 Data類、 Random類

    標(biāo)簽: java 語(yǔ)言

    上傳時(shí)間: 2013-12-20

    上傳用戶:dsgkjgkjg

  • “抓住它”小遊戲

    “抓住它”小遊戲,a applet that plays a game called Catch the Crearure. have the crature appear at a ramdom lacation for a random durarion. the goal is to catch the creature by pressing the moouse button while the mouce pointer is on the creature

    標(biāo)簽:

    上傳時(shí)間: 2015-04-13

    上傳用戶:王者A

  • Although there has been a lot of AVL tree libraries available now, nearly all of them are meant to w

    Although there has been a lot of AVL tree libraries available now, nearly all of them are meant to work in the random access memory(RAM). Some of them do provide some mechanism for dumping the whole tree into a file and loading it back to the memory in order to make data in that tree persistent. It serves well when there s just small amount of data. When the tree is somewhat bigger, the dumping/loading process could take a lengthy time and makes your mission-critical program less efficient. How about an AVL tree that can directly use the disk for data storage ? If there s something like that, we won t need to read through the whole tree in order to pick up just a little bit imformation(a node), but read only the sectors that are neccssary for locating a certain node and the sectors in which that node lies. This is my initial motivation for writing a storage-media independent AVL Tree. However, as you step forth, you would find that it not only works fine with disks but also fine with memorys, too.

    標(biāo)簽: available libraries Although nearly

    上傳時(shí)間: 2014-01-22

    上傳用戶:zhoujunzhen

  • 尋找函數(shù)的全局極小值

    尋找函數(shù)的全局極小值,global minimization of contrast function with random restarts the data are assumed whitened (i.e. with identity covariance matrix). The output is such that Wopt*x are the independent sources.

    標(biāo)簽: 函數(shù) 全局

    上傳時(shí)間: 2013-12-15

    上傳用戶:康郎

  • A program to demonstrate the optimization process of ant colony optimization for the traveling salem

    A program to demonstrate the optimization process of ant colony optimization for the traveling saleman problem (TSP). The cities are shown as red circles, the pheromone on the connections between them (fully connected graph) by gray lines. The darker the grey, the more pheromone is currently on the edge. During the optimization, the currently best found tour is drawn in red. To run the optimization, first create a random TSP, then create an ant colony, and finally run the optimization.

    標(biāo)簽: optimization demonstrate the traveling

    上傳時(shí)間: 2015-07-12

    上傳用戶:偷心的海盜

  • Example of a digital data transmission implementing GMSK modulation This Simulink model simulates a

    Example of a digital data transmission implementing GMSK modulation This Simulink model simulates as an example the transmission and reception of random digital data modulated with GMSK. The purpose of this model is to illustrate how part of the GSM transmission and reception works. It also measures the BER, affected by an AWGN channel

    標(biāo)簽: implementing transmission modulation simulates

    上傳時(shí)間: 2015-07-12

    上傳用戶:jiahao131

  • 我搜索了這個(gè)網(wǎng)站

    我搜索了這個(gè)網(wǎng)站,見提供的CD player都是 c++,delphi源程序的;我就提供一個(gè)用win32匯編寫的CD player。功能跟界面絕對(duì)不輸于用上面軟件編寫的,具體功能如下: 1. CD loop. 2. Track loop. 3. Random track play. 4. Track sample. 5. Play list. 6. Track select. 7. Master volume control. 8. CD Speaker volume controls. 9. Multiple CD drive support.

    標(biāo)簽: 搜索 網(wǎng)站

    上傳時(shí)間: 2015-07-14

    上傳用戶:遠(yuǎn)遠(yuǎn)ssad

主站蜘蛛池模板: 大城县| 鄄城县| 浦江县| 华容县| 绥宁县| 湟源县| 曲沃县| 丹巴县| 华容县| 肇源县| 左云县| 马尔康县| 城固县| 扎囊县| 英吉沙县| 新邵县| 额济纳旗| 张北县| 汾西县| 松原市| 工布江达县| 礼泉县| 罗江县| 土默特右旗| 高唐县| 黎平县| 开原市| 永安市| 金阳县| 安平县| 长阳| 遵义县| 仁布县| 襄汾县| 灵武市| 泗水县| 准格尔旗| 无为县| 山阳县| 汉中市| 乌兰浩特市|