Загрузка страницы

How Pulse Width Modulation (PWM) Works + Example | Embedded Systems Explained

Your go-to PCB & 3D Printing - PCBWay: https://www.pcbway.com
Learn how to setup microcontrollers to output pulse width modulated (PWM) signals and watch until the end for a real life example with an MSP430!
DSO150 hobby oscilloscope: https://amzn.to/36x7QgR
Siglent SDS1104X-E oscilloscope: https://amzn.to/3EvjSUH

Texas Instruments MSP430 LaunchPad (US): https://amzn.to/3KzlePN
Texas Instruments MSP430 LaunchPad (UK): https://amzn.to/2UipjAq

MSP430 Microcontroller Basics - Book (US): https://amzn.to/2OY8tDT
MSP430 Microcontroller Basics - Book (UK): https://amzn.to/2P1QoVf

GitHub companion code: https://github.com/fabytm/Embedded-Systems-Explained---PWM

Last video: https://youtu.be/xf1GyrtkaE8
Follow me on Instagram : https://www.instagram.com/thefabytm_yt
Like me on Facebook : http://www.facebook.com/TheFabytm
Secondary Channel : http://www.youtube.com/MoreTheFabytm
Follow me on Twitter : http://www.Twitter.com/TheFabytm

Try Amazon Prime with a free 30 day trial: https://amzn.to/2MG3A0T

Sign up for Airalo (international eSIM plans): https://www.airalo.com/?rfsn=4268870.6cf0a4

0:00 Intro & Embedded Systems Explained
1:16 What are Capture and Compare Modules
2:03 Timer Setup for PWM Output
3:09 Capture and Compare Module Setup for PWM Output
5:05 MSP430 PWM Example with Code Overview & Oscilloscope Waveform
7:33 Applications of PWM (Pulse Width Modulation)

My name is Fabi and I am an Engineer and Tech Enthusiast from Romania. On my YouTube channel I do thorough reviews of gadgets, showcase my programming projects and show you which cars I am driving.

This video is part of my Embedded Systems Explained series.

In today's video we'll be talking about the compare mode of the timer capture and compare modules, capable of outputting signals with a modifiable duty cycle, hence the name, pulse width modulation.

Capture and compare modules are auxilliary to timers, in architectures like the MSP430, each timer has up to 6 CCPs associated, while PIC microcontrollers have CCPs which can work with different timers. Either way, you have a set of registers governing the timer itself and one or more registers for settings regarding to the CCP.

So, with the CCP you first have to specify that it will work in compare mode and then the output mode. This means that once you set everything up, the capture and compare module will be capable of generating the PWM with no need for extra code. While you could also generate the signal through code when the interrupts are generated, this is not necessary.

The output mode defines what happens to the output signal when the timer reaches the value set in the timer's register and what happens to the output signal when the timer reaches the value set in the capture and compare module. As you can see from the screenshot I took from the user guide of the MSP430G2553 microcontroller, 4 output modes can be useful when trying to generate PWMs: Toggle/Reset, Set/Reset, Toggle/Set, Reset/Set. The output signal will have an edge when the timer reaches the value set in the timer's register and when the timer reaches the value set in the CCP register.

Видео How Pulse Width Modulation (PWM) Works + Example | Embedded Systems Explained канала TheFabytm
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
22 апреля 2022 г. 15:00:18
00:08:04
Другие видео канала
How Low Power Modes Work + Current Measurements | Embedded Systems ExplainedHow Low Power Modes Work + Current Measurements | Embedded Systems ExplainedAll about In App Purchases : Why they suck and why people hate them!All about In App Purchases : Why they suck and why people hate them!I'm Golden Barrett.50calMW3:Ep10:Tips&Tricks, maps, Create-a-class(Road To Golden, Golden Gun Show)I'm Golden Barrett.50calMW3:Ep10:Tips&Tricks, maps, Create-a-class(Road To Golden, Golden Gun Show)Battleforge Passage to Darkness Expert Part 2Battleforge Passage to Darkness Expert Part 2Channel+MW3 updates(nostalgia mappack, FMG9s nerf), Your first FPS online game+what you liked at itChannel+MW3 updates(nostalgia mappack, FMG9s nerf), Your first FPS online game+what you liked at itThe Would you rather Show 2:Go back or into the future?Sexy GF that never fucks or ugly but slutty?The Would you rather Show 2:Go back or into the future?Sexy GF that never fucks or ugly but slutty?I'm Golden Type95 MW3:Ep9:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)I'm Golden Type95 MW3:Ep9:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)I'm Golden Dragunov MW3:Ep8:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)I'm Golden Dragunov MW3:Ep8:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)Towing a car in Just Cause 2Towing a car in Just Cause 2Split Second Episode 3 Full HD gameplaySplit Second Episode 3 Full HD gameplayThe WYR Show 3:Zoom vision or hearing?Less sleep or More sleep and control dreams?Solo or MP games?The WYR Show 3:Zoom vision or hearing?Less sleep or More sleep and control dreams?Solo or MP games?MoH Warfighter:Lacks WOW factor!Not really good!First impressions video!Medal Of Honor WarfighterMoH Warfighter:Lacks WOW factor!Not really good!First impressions video!Medal Of Honor WarfighterTop 3 Games coming out in 2013 ! Games I'm looking forward to in 2013!Top 3 Games coming out in 2013 ! Games I'm looking forward to in 2013!COD4:COD Marathon(all CODS in one day), Channel Update, How to play with me on XBL(commentary)COD4:COD Marathon(all CODS in one day), Channel Update, How to play with me on XBL(commentary)Complexity of the World we live in! Technology, Internet, Automation, Simplicity!Complexity of the World we live in! Technology, Internet, Automation, Simplicity!Battleforge rPvE, 4 player map, difficulty 9 part 2Battleforge rPvE, 4 player map, difficulty 9 part 2New Trent iCarrier IMP120D External Battery Pack - Full Review !New Trent iCarrier IMP120D External Battery Pack - Full Review !BenQ ScreenBar Monitor Light Review - Exciting Sub $100 AccessoryBenQ ScreenBar Monitor Light Review - Exciting Sub $100 AccessoryMotivation 101 : How to get motivated and stay motivated!Motivation 101 : How to get motivated and stay motivated!Holiday-Christmas Gaming Gift Guide 2012-Consoles, Handheld consoles, Xbox Kinect, PS Move, iOSHoliday-Christmas Gaming Gift Guide 2012-Consoles, Handheld consoles, Xbox Kinect, PS Move, iOSThe WYR Show ep7:Screw a baby or a corpse?Sniper or Air Force pilot?Eat or be eaten by a whale?The WYR Show ep7:Screw a baby or a corpse?Sniper or Air Force pilot?Eat or be eaten by a whale?
Яндекс.Метрика