19 LPC_SYSCON->SYSAHBCLKCTRL |= (1<<7);
20 LPC_IOCON->SWCLK_PIO0_10 = 0x3;
22 LPC_TMR16B0->PR = 72-1;
23 LPC_TMR16B0->PWMC = 0x4;
25 LPC_TMR16B0->MCR = (1<<10);
26 LPC_TMR16B0->MR3 = 5000;
44 LPC_SYSCON->SYSAHBCLKCTRL |=0x100;
45 LPC_IOCON->PIO1_9 = 0x001;
47 LPC_TMR16B1->PR = 72-1;
48 LPC_TMR16B1->PWMC = 1;
50 LPC_TMR16B1->MCR = 0x80;
52 LPC_TMR16B1->MR2 = 5000;
63 void setDutyPWM1 (
float duty)
65 LPC_TMR16B0->MR2 = (uint32_t)(5000.0* duty);
72 void setDutyPWM2 (
float duty)
74 LPC_TMR16B1->MR0 = (uint32_t)(5000.0* duty);