Test upload

Dependencies:   L6470 mbed

個人的覚書です。 勝手に使うのは自己責任でお願いします。

L6470

バイポーラステッピングモータドライバ

使い方

プログラムをインポート ヘッダファイルを開いて、 初期パラメータを変更(必須)

あとは、データシート通りの命令が使える

  1. include <L6470.h>

L6470 stepper1(mosi,miso,sck,cs)

NOP()

SetParam(int param,int value)

int GetParam(int param)

Run(unsigned char dir,int spd) 速度でまわす

StepClock(unsigned char dir)

Move(unsigned char dir,int n_step) n_step(マイクロステップ ステップ数)回す

GoTo(int abs_pos) 絶対位置で回す

GoTo_DIR(unsigned char dir,int abs_pos)

GoUntil(unsigned char act,unsigned char dir,int spd)

ReleaseSW(unsigned char act,unsigned char dir)

GoHome()

GoMark()

ResetPos()

ResetDevice()

SoftStop() 停まる

SoftHiZ()

HardHiZ()

オリジナル命令

Resets() モータに初期パラメータを書き込む

リビジョン

ver1.1を公開したが、手元にL6470がないので、動作未確認

Revision:
0:f567a36d6872
Child:
1:46016c55c501
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Dec 25 02:50:52 2012 +0000
@@ -0,0 +1,27 @@
+//Test upload 
+
+//This 'L6470' example program is maked by Brid.
+//This program is free ,but 
+//
+
+#include "mbed.h"
+#include "L6470.h"
+
+Serial pc(USBTX, USBRX); 
+L6470 step1(p5, p6, p7,p8); // mosi, miso, sclk
+L6470 step2(p5, p6, p7,p11); // mosi, miso, sclk
+
+
+
+int main() 
+{
+    step1.Resets();
+    step2.Resets();
+
+    step1.Run(1,0xFFF);
+    step2.Run(1,0xFFF);
+
+
+
+   wait_us(1);
+}
\ No newline at end of file