Dependencies:   mbed

Committer:
hugozijlmans
Date:
Thu Dec 02 20:55:45 2010 +0000
Revision:
2:f034e862af1f
Parent:
1:2c52307d223f
Added UART0 support over USB mBed1768

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hugozijlmans 1:2c52307d223f 1 #include "LPC17xx.h"
hugozijlmans 1:2c52307d223f 2 #include "core_cm3.h"
hugozijlmans 1:2c52307d223f 3 #include "cmsis_nvic.h"
hugozijlmans 1:2c52307d223f 4 #include "MCPWM.h"
hugozijlmans 1:2c52307d223f 5 #include "LPC1768.h"
hugozijlmans 2:f034e862af1f 6 #include "main.h"
hugozijlmans 1:2c52307d223f 7
hugozijlmans 1:2c52307d223f 8 void MCPWM_init(void) {
hugozijlmans 1:2c52307d223f 9
hugozijlmans 1:2c52307d223f 10 // Make the timer overload at 2000 (96MHz / 2000 = 48kHz)
hugozijlmans 1:2c52307d223f 11 // Set the value to 1999 --> hex 7CF
hugozijlmans 2:f034e862af1f 12 MCLIM0 = MCPWM_DIV;
hugozijlmans 2:f034e862af1f 13 MCLIM1 = MCPWM_DIV;
hugozijlmans 2:f034e862af1f 14 MCLIM2 = MCPWM_DIV;
hugozijlmans 1:2c52307d223f 15
hugozijlmans 1:2c52307d223f 16 }