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
Reconstruction- and example-based super-resolution (SR) methods are promising for restoring a high-resolution (HR) image from low-resolution (LR) image(s). Under large magnification, reconstruction-based methods usually fail to hallucinate visual details while example-based methods sometimes introduce unexpected details. Given a generic LR image, to reconstruct a photo-realistic SR image and to suppress artifacts in the reconstructed SR image, we introduce a multi-scale dictionary to a novel SR method that simultaneously integrates local and non-local priors. The local prior suppresses artifacts by using steering kernel regression to predict the target pixel from a small local area. The non-local prior enriches visual details by taking a weighted average of a large neighborhood as an estimate of the target pixel. Essentially, these two priors are complementary to each other. Experimental results demonstrate that the proposed method can produce high quality SR recovery both quantitatively and perceptually.
标签: Super-resolution Multi-scale Dictionary Single Image for
上传时间: 2019-03-28
上传用户:fullout
The idea of writing this book entitled “Cognitive Networked Sensing and Big Data” started with the plan to write a briefing book on wireless distributed computing and cognitive sensing. During our research on large-scale cognitive radio network (and its experimental testbed), we realized that big data played a central role. As a result, the book project reflects this paradigm shift. In the context, sensing roughly is equivalent to “measurement.”
标签: Cognitive Networked Sensing Data Big and
上传时间: 2020-05-26
上传用户:shancjb
This book describes how global mobile communication was made. It is written for those who want or need to know how this was achieved e.g.: † Young professionals who want to build their career on GSM and UMTS and need to understand the basics † Strategic and technical planners who want to drive the future GSM and UMTS develop- ment † Strategists who plan to repeat GSM’s success in the fourth generation † Academics, who want to understand and analyse the development of GSM and UMTS; † Activists in other large scale international communication projects who want to use experiences gained
标签: Creation UMTS GSM and The of
上传时间: 2020-05-27
上传用户:shancjb
This books presents the research work of COST 273 Towards Mobile Broadband Multimedia Networks, hence, it reports on the work performed and on the results achieved within the project by its participants. The material presented here corresponds to the results obtained in four years of collaborative work by more than 350 researchers from 137 institutions (universities, operators, manufacturers, regulators, independent laboratories and others – a full list is provided in Appendix B) belonging to 29 countries (mainly European, but also from Asia and North America) in the area of mobileradio. Theobjectiveofpublishingtheseresultsasabookisessentiallytomakethemavailable to an audience wider than the project. In fact, it just follows a ‘tradition’ of previous COST Actions in this area of telecommunications, i.e. COST 207, 231 and 259.
标签: Multimedia Techniques Broadband Networks Mobile
上传时间: 2020-05-30
上传用户:shancjb
Since the principle of multi-carrier code division multiple access (MC-CDMA) was simultaneously proposed by Khaled Fazel et al. and Nathan Yee et al. at the IEEE International Symposium on Personal, Indoor and Mobile Radio Communications (PIMRC) in the year 1993, multi-carrier spread spectrum (MC-SS) has rapidly become one of the most wide spread independent research topics on the field of mobile radio communications. Therefore, the International Workshop on Multi-Carrier Spread Spectrum (MC-SS) was initiated in the year 1997. Multi-carrier and spread spectrum systems with their generic air interface and adaptive technologies are considered as potential candidates to fulfill the requirements of next generation mobile communications systems.
标签: Multi-Carrier Spectrum Spread 2007
上传时间: 2020-05-31
上传用户:shancjb
The ever-increasing demand for private and sensitive data transmission over wireless net- works has made security a crucial concern in the current and future large-scale, dynamic, and heterogeneous wireless communication systems. To address this challenge, computer scientists and engineers have tried hard to continuously come up with improved crypto- graphic algorithms. But typically we do not need to wait too long to find an efficient way to crack these algorithms. With the rapid progress of computational devices, the current cryptographic methods are already becoming more unreliable. In recent years, wireless re- searchers have sought a new security paradigm termed physical layer security. Unlike the traditional cryptographic approach which ignores the effect of the wireless medium, physi- cal layer security exploits the important characteristics of wireless channel, such as fading, interference, and noise, for improving the communication security against eavesdropping attacks. This new security paradigm is expected to complement and significantly increase the overall communication security of future wireless networks.
标签: Communications Physical Security Wireless Layer in
上传时间: 2020-05-31
上传用户:shancjb
Quality of Service ( QoS ) has always been in a world of its own, but as the technology has been refi ned and has evolved in recent years, QOS usage has increased to the point where it is now considered a necessary part of network design and operation. As with most technologies, large - scale deployments have led to the technology becoming more mature, and QOS is no exception.
标签: QOS-Enabled Networks
上传时间: 2020-05-31
上传用户:shancjb
It was only a few years ago that “ubiquitous connectivity” was recognized as the future of wireless communication systems. In the era of ubiquitous connectivity, it was expected that the broadband mobile Internet experience would be pervasive, and seamless connectivity on a global scale would be no surprise at all. The quality of service would be guaranteed no matter when/where/what the users wanted with the connectivity. Connectivity would even be extended to object-to-object communication, where no human intervention was required. All objects would become capable of autonomous communication.
标签: Protocols Radio LTE-A LTE for and
上传时间: 2020-06-01
上传用户:shancjb
This book was born from the perception that there is much more to spectrum use and sharing than one sees reflected in publications, whether academic, commercial or political. the former – in good research style – tend towards reductionism and concentrate on specific, detailed aspects. commercial publications tend to empha- size the positive aspects and they tend to put promise above practice. Given the ever increasing pace of technology development and recent successes of new wireless technologies, some pundits predict large-scale spectrum scarcity, potentially lead- ing to economic catastrophe. Although economic theory has a hard time explaining recent events that shook the world economy, the notion of spectrum scarcity is intui- tively acceptable, even if not correct or immediately relevant.
上传时间: 2020-06-01
上传用户:shancjb