Luiz Fischer

Dependencies:   FastPWM mbed

Files at this revision

API Documentation at this revision

Comitter:
nlfischer
Date:
Fri Jan 05 18:08:27 2018 +0000
Commit message:
Luiz Fischer

Changed in this revision

FastPWM.lib Show annotated file Show diff for this revision Revisions of this file
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/FastPWM.lib	Fri Jan 05 18:08:27 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/Sissors/code/FastPWM/#c0b2265cff9c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jan 05 18:08:27 2018 +0000
@@ -0,0 +1,10 @@
+#include "mbed.h"
+#include "FastPWM.h"
+//fast pwm example for stm nucleo f311re
+    FastPWM fastpwm(PB_4,1); //steup pwm output on pin PB_4 with a prescaler of 1   
+int main() {
+    fastpwm.period_ticks (5000); //setup the period for 20Khz 
+    fastpwm.pulsewidth_ticks( 2500);//setup duty cycle to 50%
+    while(1) {
+             }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 05 18:08:27 2018 +0000
@@ -0,0 +1,1 @@
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e7ca05fa8600
\ No newline at end of file