Dependencies:   mbed

MCPWM.c

Committer:
hugozijlmans
Date:
2010-12-02
Revision:
1:2c52307d223f
Child:
2:f034e862af1f

File content as of revision 1:2c52307d223f:

#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;

}