Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[ARM] Not able to generate DeadTime in between channel A0 & B0 in LPC1768

Status
Not open for further replies.

gaviprakash

Newbie level 1
Joined
Oct 10, 2016
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
16
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


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:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top