⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 abstract.txt

📁 keil-C51完全破解版-28.7M.zip
💻 TXT
字号:
LPC932 EXAMPLE:	CREATING PWM SIGNALS USING THE CAPTURE COMPARE UNIT (CCU)
Christian Kulig, 12/06/02



INTRODUCTION:
The LPC932 can be used to create Pulse Width Modulated PWM signals. With a PWM signal and 
a simple RC-filter it is possible to generate an analog output signal.
The current analog value of this signal at a certain point in time is proportional to its 
Duty Cycle which is percentage of  High Time during one period or the average value during 
a particular period. That means after low pass filtering, (e.g. RC circuit) the signal 
becomes analog, with an actual value controlled by the microcontroller. The PWM functionality 
enables the LPC932 to control for example the speed of DC motors or the brightness of 
electric lighting.


DESCRIPTION:
The LPC932 has various ways to create many types of PWM signals.
This sample utilizes the Capture Compare Unit (CCU) to create two independent PWM signals, 
which are used to control the brightness of two LEDs on port P2.1 and P2.6. The program sets 
up two Compare Channels to provide asymmetrical PWM with a fixed frequency, but variable 
Duty Cycle. The selected frequency is high enough, so that the eye cannot recognize, that 
the LED is actually switched on and off alternately, but it sees different brightness 
according to different duty cycles.
To show the independence of both Compare Channels, their Duty Cycles are varied in opposite 
directions. That means, while one LED turns brighter, the other one turns darker.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -