Wednesday, 11 November 2015

PWM programming in ARM

  #include<lpc21xx.h>
  int main()
  {

    PINSEL0=0x00008000;
 
    PWMMR0=100;

    PWMMR1=41;

    PWMMR2=78;

    PWMTCR=0x00000009;

   PWMPR=0X00000000;

   PWMTC=0X00000000;

   PWMMCR=0X00000002;

   PWMPCR=0X0604;
   //PWMLER=1;

   while(1);
  }

No comments:

Post a Comment