sun luxi

questions in procedures transplant MC68HC908QT4 to MC9S08QD4

Discussion created by sun luxi on Mar 4, 2013

Procedures transplant MC68HC908QT4 to MC9S08QD4, PWM settings 908QT4 function bit TSC0_CH0MAX set 0,1 QD4 corresponding bit, how to solve, guidance.

 

#if PWM_POLARITY == PWM_NEG /* negative PWM polarity */

                if (AppControl.B.FullOpen == 1)     /* PWM fully open, duty cycle set to 0% */

                {

                    if (AppControl.B.ZeroDuty == 0)

                    {

                        AppControl.B.ZeroDuty = 1;   /* zero duty cycle on */

                      TSC0_CH0MAX=0; //  MC9S08QD4    TPMC0V = 0; use MIN20  ?

                    }

                }

                else

                {

                    if (AppControl.B.ZeroDuty == 1)

                    {

                        AppControl.B.ZeroDuty = 0; /* zero duty cycle off */

                        TSC0_CH0MAX=1;// MC9S08QD4  TPMC0V = 220;  use  MAX 200  ?

                    }

                }

            #else                       /* positive PWM polarity */

                if (AppControl.B.FullOpen == 1)     /* PWM fully open, duty cycle set to 100% */

                {

                    if (AppControl.B.MaxDuty == 0)

                    {

   

                        AppControl.B.MaxDuty = 1;   /* Max duty cycle on */

                        TSC0_CH0MAX=0;

                    }

                }

                else

                {

                    if (AppControl.B.MaxDuty == 1)

                    {

                        AppControl.B.MaxDuty = 0; /* Max duty cycle off */

                       TSC0_CH0MAX=1;

                    }

   

                }

            #endif

 

Outcomes