Dependencies:   mbed

Committer:
hugozijlmans
Date:
Thu Dec 02 12:32:18 2010 +0000
Revision:
1:2c52307d223f
Child:
2:f034e862af1f
Added RIT & Timer0 interrupt routines

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 1:2c52307d223f 6
hugozijlmans 1:2c52307d223f 7 void MCPWM_init(void) {
hugozijlmans 1:2c52307d223f 8
hugozijlmans 1:2c52307d223f 9 // Make the timer overload at 2000 (96MHz / 2000 = 48kHz)
hugozijlmans 1:2c52307d223f 10 // Set the value to 1999 --> hex 7CF
hugozijlmans 1:2c52307d223f 11 MCLIM0 = 0x000007CF;
hugozijlmans 1:2c52307d223f 12 MCLIM1 = 0x000007CF;
hugozijlmans 1:2c52307d223f 13 MCLIM2 = 0x000007CF;
hugozijlmans 1:2c52307d223f 14
hugozijlmans 1:2c52307d223f 15 }