Timers and pulse width modulation with MCUs
44
-
Upload
mustafa-alghali -
Category
Engineering
-
view
127 -
download
3
Transcript of Timers and pulse width modulation with MCUs
![Page 1: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/1.jpg)
![Page 2: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/2.jpg)
![Page 3: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/3.jpg)
![Page 4: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/4.jpg)
![Page 5: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/5.jpg)
![Page 6: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/6.jpg)
![Page 7: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/7.jpg)
internal clock source external clock source
default √ X
Advantages Provide the fastest operation Unlimited designs of pulses.
Disadvantages Limited by four types of pulses four modes PRESCALAR.
Requires constructing external circuit to generate pulses such (oscillator , RC circuit)
![Page 8: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/8.jpg)
`
Try different CPU frequencies
![Page 9: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/9.jpg)
![Page 10: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/10.jpg)
![Page 11: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/11.jpg)
![Page 12: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/12.jpg)
![Page 13: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/13.jpg)
![Page 14: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/14.jpg)
![Page 15: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/15.jpg)
![Page 16: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/16.jpg)
![Page 17: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/17.jpg)
(for example between 0-12 volts). The trick is to vary the duty cycle between 0 to 100% and get same percentage of input voltage to output. Consider the following examples: Here the duty cycle is 75%. Here the duty cycle is 12.5% So the equivalent analog So the analog voltage voltage output is 3.75V. output is 0.625V
![Page 18: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/18.jpg)
![Page 19: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/19.jpg)
![Page 20: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/20.jpg)
![Page 21: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/21.jpg)
![Page 22: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/22.jpg)
![Page 23: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/23.jpg)
![Page 24: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/24.jpg)
![Page 25: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/25.jpg)
![Page 26: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/26.jpg)
![Page 27: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/27.jpg)
![Page 28: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/28.jpg)
![Page 29: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/29.jpg)
![Page 30: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/30.jpg)
![Page 31: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/31.jpg)
![Page 32: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/32.jpg)
![Page 33: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/33.jpg)
![Page 34: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/34.jpg)
![Page 35: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/35.jpg)
![Page 36: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/36.jpg)
![Page 37: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/37.jpg)
![Page 38: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/38.jpg)
![Page 39: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/39.jpg)
![Page 40: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/40.jpg)
![Page 41: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/41.jpg)
![Page 42: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/42.jpg)
![Page 43: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/43.jpg)
![Page 44: Timers and pulse width modulation with MCUs](https://reader034.fdocuments.net/reader034/viewer/2022042615/55a9d9e71a28ab4e3c8b4603/html5/thumbnails/44.jpg)