This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

第一次用MSP430f5438做稳压电源,但占空比一直在下降,求指导

Other Parts Discussed in Thread: TLC2543

您好,请问一下,一下是我的程序,想要稳定在一定范围内,但占空比一直在下降,求指导

if(V1<1677)//V1是AD芯片采集回来的数据

     {      

        time1=time1+1; 

            TA1CCR2 =time1;               // TA1CCR0 =800  ,TA1CCR2 =time1, TA1CCTL2 =OUTMOD_7

             TLC2543_read(0x02);     //AD采集的通道  

        }       

     if(V1>1700)

{                   

  time1=time1-1;    

            TA1CCR2 =time1;     

           TLC2543_read(0x02);      

      }              

   if(((V1>1677)&&(V1<1698))!=0)    

          {                  time1=time1;        

                           TLC2543_read(0x02);     

                           }      

     pwm_init();