DipCortex PwmOut Example

Dependencies:   mbed

Fork of DipCortex-PWM by Carl - SolderSplash Labs

PwmOut Example for the DipCortex

Mbed PwmOut library can use the following pins :

Timer/Match Register	Pinout Options
CT16B0/MR0	p15 (P0_8) and p19 (p1_13)
CT16B0/MR1	p16 (P0_9) and p20 (p1_14)
CT16B0/MR2	p27 (P1_15) and p27 (p1_15)

CT16B1/MR0	p24 (P0_21)
CT16B1/MR1	p9 (P0_22) and p38 (P1_23)

CT32B0/MR0	p17 (P1_24) and p26 (P0_18)
CT32B0/MR1	p29 (P1_25) and p25 (P0_19)
CT32B0/MR2	p35 (P1_26)

Please refer to the Pin Out diagram for the WiFi DipCortex to avoid Pins used to communicate with the CC3000 http://www.soldersplash.co.uk/products/wifi-dipcortex/

Revision:
2:ab9790e6d19e
Parent:
1:a4fac4fed052
Child:
3:065f35bc0f29
--- a/main.cpp	Wed Feb 05 01:28:51 2014 +0000
+++ b/main.cpp	Wed Feb 05 02:03:32 2014 +0000
@@ -15,10 +15,11 @@
 {
 float pwmStep = 0;
     
+    // We want a 2KHz Pwm
     // Pwm1, 2 and 3 share a timer so use the same period
-    pwm1.period_ms(20);
-    pwm4.period_ms(20);
-    pwm7.period_ms(20);
+    pwm1.period_us(500);
+    pwm4.period_ms(500);
+    pwm7.period_ms(500);
     
     while (1)
     {