![](/media/cache/profiles/74961657ae02e93fc17be9d9fc864620.50x50_q85.jpg)
MCPWM.c
- Committer:
- hugozijlmans
- Date:
- 2010-12-02
- Revision:
- 2:f034e862af1f
- Parent:
- 1:2c52307d223f
File content as of revision 2:f034e862af1f:
#include "LPC17xx.h" #include "core_cm3.h" #include "cmsis_nvic.h" #include "MCPWM.h" #include "LPC1768.h" #include "main.h" void MCPWM_init(void) { // Make the timer overload at 2000 (96MHz / 2000 = 48kHz) // Set the value to 1999 --> hex 7CF MCLIM0 = MCPWM_DIV; MCLIM1 = MCPWM_DIV; MCLIM2 = MCPWM_DIV; }