设置如下:
unsigned short pwmizhouqi=256;
LPC_TMR16B1->TCR = 0;
LPC_SYSCON->SYSAHBCLKCTRL |= (1<<8);
LPC_TMR16B1->TCR = 0;
LPC_IOCON->PIO1_9 = 0X01;
LPC_TMR16B1->MR0 = pwmizhouqi/2;
LPC_TMR16B1-> PWMC = 0x01;
LPC_TMR16B1-> PR=22;
LPC_TMR16B1->MCR = 0x0400;
LPC_TMR16B1->MR3 = pwmizhouqi;
LPC_TMR16B1->CTCR = 0x00;
LPC_TMR16B1->TCR = 1;
麻烦指点一下,
此帖出自
小平头技术问答
一周热门 更多>