Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FastPWM GMD_template_lib mbed
You are viewing an older revision! See the latest version
GMD
このプログラムが動作しているMD(モータドライバ)(以下「GMD」とする)の使用方法を説明します。
インターフェース¶
GMDはインターフェースとしてI2Cを備えていて、スレーブとして動作します。また、I2Cで使うアドレスを決定するために4PのDIPスイッチがあり、起動時にこのスイッチの値を読み取りアドレスを決定します。
I2Cのアドレス¶
I2Cのアドレスには
表 3. 予約済のア ド レス X = don’t care; 1 = HIGH; 0 = LOW. スレーブアドレス R/W ビット 説明 0000 000 0 ゼネラルコールア ド レス [1] 0000 000 1 スタートバイ ト [2] 0000 001 X CBUS アドレス [3] 0000 010 X 異な るバス フ ォーマ ッ ト用に予約 [4] 0000 011 X 将来の使用のため予約 0000 1XX X Hs-mod マスタコード 1111 1XX X デバイス ID 1111 0XX X 10 ビ ッ ト スレーブア ド レス指定
I2C¶
I2Cのデータ長は1Byteです。この1Byteが8bitの符号付き整数型として評価され、