The assembly version of the problem 2 solution

Info icon This preview shows pages 12–13. Sign up to view the full content.

The Assembly Version of the Problem 2 Solution #include “Huang/Utils/hcs12.h” PWMCLK = 0; /* select clock B as the clock source of PWM2 */ PWMPRCLK = 0x40; /* set clock prescaler to 16 */ PWMPOL = 4; /* PWM2 output high at the start of the period */ PWMCAE = 4; /* PWM2 center aligned */ PWMCTL = 0x0C; /* 8-bit mode, stop PWM in wait/freeze modes */ PWMPER2 = 150; /* set period value */ PWMDTY2 = 105; /* set duty cycle value */ PWMCNT2 = 0; /* reset PWM2 counter */ PWME2 = PWMEN; /* enable PWM2 */ Listing 2.2 The C-language Version of the Problem 2 Solution ††† Problems from the Huang’s text are marked at the beginning of a problem statement in round brackets
Image of page 12

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

13 Review Questions #9 ( Stepper Motor ) d) Describe the differences between the Full Step and Half Step operation of a Stepper Motor See Lecture slides. In Full Step Mode rotor poles are located between the energizing coils only, while in Half Step Mode the poles positions can be in between the coils. Thus we need twice as many steps in the Half Step Mode to complete a single revolution. e) What is a purpose(s) of a stepper motor driver. Explain. 1. (Primary) Pride current to energize coils 2. (Secondary) Encoding (Gray) of the sequence of coil currents. Note that this can be achieved by MCU too but would affect the CPU operations. f) Why does we use Gray encoding for Stepper Motor control The induction in coils causes high frequency oscillations in currents. The Gray encoding while doesn’t remove them produces the minimal impact.
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '16
  • Pulse-width modulation

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern