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がないので、動作未確認

Files at this revision

API Documentation at this revision

Comitter:
Brid
Date:
Wed Mar 05 06:39:18 2014 +0000
Parent:
0:f567a36d6872
Commit message:
ver1.1

Changed in this revision

L6470.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
--- a/L6470.lib	Tue Dec 25 02:50:52 2012 +0000
+++ b/L6470.lib	Wed Mar 05 06:39:18 2014 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/Brid/code/L6470/#bb4bb05904cb
+http://mbed.org/users/Brid/code/L6470/#97c203ed65da
--- a/main.cpp	Tue Dec 25 02:50:52 2012 +0000
+++ b/main.cpp	Wed Mar 05 06:39:18 2014 +0000
@@ -8,8 +8,8 @@
 #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
+L6470 step1(p5, p6, p7,p8); // mosi, miso, sck,cs
+L6470 step2(p5, p6, p7,p11); // mosi, miso, sck,cs