LED 一般是恒流操作的,如何改變 LED 的亮度呢?答案就是 PWM 控制。在一定的 頻率的方波中,調整高電平和低電平的占空比,即可實現。比如我們用低電平點亮一個 LED 燈,我們假設把一個頻率周期分為 10 個時間等份,如果方波中的高低電平占空比是 9:1, 這是就是一個比較暗的亮度,如果方波中高低電平占空比是 10:0,這時,全部是高電平, 燈是滅的。如果占空比是 5:5,就是一個中間亮度,如果高低比是 1:9,是一個比較亮的 亮度,如果高低是 0:10,這時全部是低電平,就是最亮的。 實際上應用中,電視屏幕墻中的幾十百萬 LED 象素都是這樣控制的,而且每一個象素 都有紅綠藍 3 個 LED,每個 LED 可以變化的亮度是幾百到幾萬或者更多的級別,以實現真 彩色的顯示。還有在您的手機中,背光燈的亮度如果是可以變化的,也應該是這種工作方式。 目前的城市彩燈也有很多都使用了 LED,需要控制亮度是也是 PWM 控制。 下面來分析我們的例程,在這個例程中,我們將定時器 2 溢出定為 1/1200 秒。每 10 次脈沖輸出一個 120HZ 頻率。這每 10 次脈沖再用來控制高低電平的 10 個比值。這樣,在 每個 1/120 秒的方波周期中,我們都可以改變方波的輸出占空比,從而控制 LED 燈的 10 個 級別的亮度。 為什么輸出方波的頻率要 120HZ 這么高?因為如果頻率太低,人眼就會看到閃爍感 覺。一般起碼要在 60HZ 以上才感覺好點,120HZ 就基本上看不到閃爍,只能看到亮度的變 化了。 下面請看程序,程序中有比較多的注釋: ――――――――――――――――――――――― #define uchar unsigned char //定義一下方便使用 #define uint unsigned int #define ulong unsigned long #include <reg52.h> //包括一個 52 標準內核的頭文件 sbit P10 = P1^0; //要控制的 LED 燈 sbit K1= P3^2; //按鍵 K1 uchar scale;//用于保存占空比的輸出 0 的時間份額,總共 10 份 char code dx516[3] _at_ 0x003b;//這是為了仿真設置的 //模擬 PWM 輸出控制燈的 10 個亮度級別 void main(void) // 主程序 { uint n; RCAP2H =0xF3; //賦 T2 的預置值,溢出 1 次是 1/1200 秒鐘 RCAP2L =0x98; TR2=1; //啟動定時器 ET2=1; //打開定時器 2 中斷 EA=1; //打開總中斷 while(1) //程序循環 { ;//主程序在這里就不斷自循環,實際應用中,這里是做主要工作 for(n=0;n<50000;n++); //每過一會兒就自動加一個檔次的亮度 scale++; if(scale==10)scale=0; } } //1/1200 秒定時器 2 中斷 timer2() interrupt 5 { static uchar tt; //tt 用來保存當前時間在一秒中的比例位置 TF2=0; tt++; if(tt==10) //每 1/120 秒整開始輸出低電平 { tt=0; if(scale!=0) //這里加這一句是為了消除滅燈狀態產生的鬼影 P10=0; } if(scale==tt) //按照當前占空比切換輸出高電平 P10=1; } ―――――――――――――――――― 在主程序中,每延時一段時間,就自動換一個占空比,以使亮度自動變化,方便觀察。 編譯,運行,看結果。 可以看到,LED 的亮度以每種亮度 1 秒左右不斷變化,共有 10 個級別。
上傳時間: 2017-11-06
上傳用戶:szcyclone
貼片鋁電解電容封裝庫 SMD Aluminum Electrolytic Capacitors VE Features ? 3 ~ 16φ, 85℃, 2,000 hours assured ? Chip type large capacitance capacitors ? Designed for surface mounting on high density PC board. ? RoHS Compliance
上傳時間: 2018-05-09
上傳用戶:angel20041401
In this paper, we consider the channel estimation problem in Millimeter wave (mmWave) wireless systems with large antenna arrays. By exploiting the inherent sparse nature of the mmWave channel, we develop a novel rate-adaptive channel estimation (RACE) algorithm, which can adaptively adjust the number of required channel measurements based on an expected probability of estimation error (PEE).
標簽: Estimation Millimeter Adaptive Approach Channel Systems Rate MIMO Wave for
上傳時間: 2020-05-26
上傳用戶:shancjb
This book examines the technologies underlying the compression and trans- mission of digital video sequences over networking platforms. The incorporated study covers a large spectrum of topics related to compressed video communica- tions. It presents to readers a comprehensive and structured analysis of the issues encountered in the transmission of compressed video streams over networking environments.
標簽: Compressed Video Communications
上傳時間: 2020-05-26
上傳用戶:shancjb
Cellular communications is one of the fastest growing and most challenging telecom- munication applications ever. Today, it represents a large and continuously increasing percentage of all new telephone subscribers around the world. In the long term, cellular digital technology may become the universal way of communication.
標簽: Engineering System GSM
上傳時間: 2020-05-27
上傳用戶:shancjb
The wireless market has experienced a phenomenal growth since the first second- generation (2G) digital cellular networks, based on global system for mobile communications (GSM) technology, were introduced in the early 1990s. Since then, GSM has become the dominant global 2G radio access standard. Almost 80% of today’s new subscriptions take place in one of the more than 460 cellular networks that use GSM technology. This growth has taken place simultaneously with the large experienced expansion of access to the Internet and its related multimedia services.
標簽: Performance Evolution GPRS EDGE GSM and
上傳時間: 2020-05-27
上傳用戶:shancjb
In this paper we revisit hybrid analog-digital precoding systems with emphasis on their modelling and radio-frequency (RF) losses, to realistically evaluate their benefits in 5G system implementations. For this, we decompose the analog beamforming networks (ABFN) as a bank of commonly used RF components and formulate realistic model constraints based on their S-parameters. Specifically, we concentrate on fully-connected ABFN (FC-ABFN) and Butler networks for implementing the discrete Fourier transform (DFT) in the RF domain. The results presented in this paper reveal that the performance and energy efficiency of hybrid precoding systems are severely affected, once practical factors are considered in the overall design. In this context, we also show that Butler RF networks are capable of providing better performances than FC-ABFN for systems with a large number of RF chains.
標簽: Analog-Digital Precoding Hybrid
上傳時間: 2020-05-27
上傳用戶:shancjb
When we started thinking about writing the first edition of this book a few years ago, we had been working together for more than five years on the borderline between propagation and signal processing. Therefore, it is not surprising that this book deals with propagation models and design tools for MIMO wireless communications. Yet, this book should constitute more than a simple combination of these two domains. It hopefully conveys our integrated understanding of MIMO, which results from endless controversial discussions on various multi-antenna related issues, as well as various interactions with numerous colleagues. Obviously, this area of technology is so large that it is beyond our aim to cover all aspects in details. Rather, our goal is to provide researchers, R&D engineers and graduate students with a comprehensive coverage of radio propagation models and space–time signal processing techniques for multi-antenna, multi-user and multi-cell networks.
上傳時間: 2020-05-28
上傳用戶:shancjb
When we started thinking about writing this book, we had been working together for more than five years on the borderline between propagation and signal processing.Therefore, it is not surprising that this book deals with propagation models and design tools for MIMO wirelesscommunications.Yet, thisbookshouldconstitutemorethanasimplecombination of these two domains. It hopefully conveys our integrated understanding of MIMO, which results from endless controversial discussions on various multi-antenna related issues, as well as various interactions with numerous colleagues. Obviously, this area of technology is so large that it was beyond our aim to cover all aspects in details. Rather, our goal has been to provide researchers, R&D engineers and graduate students with a comprehensive coverage of radio propagation models and space–time coding techniques.
標簽: Communications5 Wireless MIMO
上傳時間: 2020-05-28
上傳用戶:shancjb
Mobile wireless communications are in constant evolution due to the continu- ously increasing requirements and expectations of both users and operators. Mass multimedia* services have been for a long time expected to generate a large amount of data traffic in future wireless networks [1]. Mass multimedia services are, by definition, purposed for many people. In general, it can be distinguished between the distribution of any popular content over a wide area and the distribu- tion of location-dependent information in highly populated areas. Representative examples include the delivery of live video streaming content (like sports compe- titions, concerts, or news) and file download (multimedia clips, digital newspa- pers, or software updates).
標簽: Broadcasting Generation Mobile Next
上傳時間: 2020-05-31
上傳用戶:shancjb