Internet Explorer is not a supported browser for TI.com. For the best experience, please use a different browser.
Video Player is loading.
Current Time 0:00
Duration 1:58
Loaded: 0%
Stream Type LIVE
Remaining Time 1:58
 
1x
  • Chapters
  • descriptions off, selected
  • en (Main), selected

The purpose of this lab is to write software that uses the timers to create PWM outputs. For this lab, you'll need the LaunchPad, the chassis, the power distribution and motor board, two motors, and two wheels. In this particular portion of the lab, we will test the timer-generated PWM outputs. Here's the robot with the solution to lab 13 loaded.

So the goal of lab 13 is to use the PWM hardware to spin the motor. So let me turn it on. The motor's on, and the motors will spin. And this portion of the lab, the motors go through a sequence of operations. So it goes forward for awhile, goes backward for a while, turns left, and turns right. You can notice that the wheels don't actually spin at the same speed. That's because it's an open loop controller.

Now all up on the oscilloscope, you can see the timer-triggered PWM output. And under each case, we have the frequency, which is a constant. And what this software is doing is varying the duty cycle. Again, the goal of the PWM is to run this frequency faster than the time constant of the motor.

In this lab, you learned that the timer can create PWM outputs with no software overhead at all. The software just needs to write to the timer when it wants to change the duty cycle. Using the timers for PWM and periodic interrupts, provide a mechanism to grow the complexity of your robot system. Have fun.