gaviprakash
Newbie level 1
Hi,
Iam generating MCPWM with deadtime in LPC1768.but iam not able to generate dead time I read datasheet.Iam able to get signals on channelA0 & B0 but it is not generating deadtime in between 2 signals. can anyone please help.below is my code
Thanks
Iam generating MCPWM with deadtime in LPC1768.but iam not able to generate dead time I read datasheet.Iam able to get signals on channelA0 & B0 but it is not generating deadtime in between 2 signals. can anyone please help.below is my code
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 main() { SystemInit(); //Clock and PLL configuration LPC_SC->PCONP |= (1<<17); /* Power ON Timer0,1 */ LPC_SC->PCLKSEL1 |=(1<<30)|(1<<31); LPC_PINCON->PINSEL3 |= (1<<12)|(1<<6); LPC_PINCON->PINMODE3 |= (1<<6)|(1<<7)|(1<<12)|(1<<13); LPC_GPIO1->FIODIR |= (1<<19)|(1<<22); LPC_MCPWM->MCCCP = (1<<0)|(1<<1)|(1<<2)|(1<<3); LPC_MCPWM->MCCON_SET |=(1<<3)|(1<<31)|(1<<29);//|(1<<1)|(1<<9) ; LPC_MCPWM->MCTIM0 = 0; LPC_MCPWM->MCPER0 = 1000; LPC_MCPWM->MCPW0 = 600; LPC_MCPWM->MCDEADTIME = 0x100 ; for(i=0;i<10000;i++) for(j=0;j<1000;j++); LPC_MCPWM->MCCON_SET |= (1<<0); while(1) { } }
Thanks
Last edited by a moderator: