Very basic PwmOut program on the K64F

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
GerritPathuis
Date:
Sun Jul 06 19:48:30 2014 +0000
Child:
1:cce9c0636038
Commit message:
Works

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sun Jul 06 19:48:30 2014 +0000
@@ -0,0 +1,33 @@
+/*
+Basic test PwmOut on the K64F //
+
+Possible PwmOut pins are
+
+PwmOut qq(PTA0);
+PwmOut qq(PTA1);
+PwmOut qq(PTA2);
+
+PwmOut qq(PTC2);
+PwmOut qq(PTC3);
+PwmOut qq(PTC4);
+PwmOut qq(PTC10);
+PwmOut qq(PTC11);
+
+PwmOut qq(PTD1);
+PwmOut qq(PTD2);
+PwmOut qq(PTD3);
+*/
+
+#include "mbed.h"
+
+PwmOut qq(PTA0);        // Scoop connected to this pin and ground
+
+int main()
+{
+    qq.period(1/100);   // Period set to 100 Hz
+    qq= 0.50;           // Duty cycle set to 50%           
+
+    while (true) {
+        // do something
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sun Jul 06 19:48:30 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae
\ No newline at end of file