Program for TI DRV8711 to run stepper motor.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
Incursion4life
Date:
Tue Sep 09 21:12:21 2014 +0000
Commit message:
First

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
diff -r 000000000000 -r f04507630faa main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Sep 09 21:12:21 2014 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+DigitalOut step(p8);
+DigitalOut dir(p9);
+SPI mot(p11,p12,p13);
+#define CTRL=0x00;
+#define TORQUE=0x01;
+#define OFF=0x02;
+#define BLANK=0x03;
+#define DECAY=0x04;
+#define STALL=0x05;
+#define DRIVE=0x06;
+#define STATUS=0x07;
+
+int main() {
+    dir=0;
+    mot.write(0x0
+    while(1) {
+        step = 1;
+        wait_us(100);
+        step = 0;
+        wait_us(100);
+    }
+}
diff -r 000000000000 -r f04507630faa mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Sep 09 21:12:21 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9327015d4013
\ No newline at end of file