Hugo Zijlmans
/
BLDC
Diff: MCPWM.c
- Revision:
- 1:2c52307d223f
- Child:
- 2:f034e862af1f
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MCPWM.c Thu Dec 02 12:32:18 2010 +0000 @@ -0,0 +1,15 @@ +#include "LPC17xx.h" +#include "core_cm3.h" +#include "cmsis_nvic.h" +#include "MCPWM.h" +#include "LPC1768.h" + +void MCPWM_init(void) { + + // Make the timer overload at 2000 (96MHz / 2000 = 48kHz) + // Set the value to 1999 --> hex 7CF + MCLIM0 = 0x000007CF; + MCLIM1 = 0x000007CF; + MCLIM2 = 0x000007CF; + +} \ No newline at end of file