LoginSignup
0
0

More than 5 years have passed since last update.

I2C > AQM0802 > Instruction Write operation / Data Write operation > 0x40, 0x00

Last updated at Posted at 2016-02-16

@exabugs さんのコードを元に勉強中。
http://qiita.com/exabugs/items/9d1b66aa1d22805afbc8

uint8_t CONTROLL[] = {
  0x00, // Command
  0x40, // Data
};

をようやく理解した。

http://akizukidenshi.com/download/ds/xiamen/AQM0802.pdf
にある2ページ目の「データとコマンドのWRITE方法」を参照。

その項目の下の図にどういうビット列を送信するのかが書かれている。
その図の中央にcontrol byteというのがあり、以下のように記載されている。

| Co | Rs | 0 | 0 | 0 | 0 | 0 | 0 |

Coに0か1を入れることで、以下を示すことになる。

  • 1: それ以降にも文字が続く
  • 0 : 最後の文字

Rsについては

RS R/W
L L Instruction Write opearation
H L Data Write operation

という記載が図の下の方にある。

ということで、仮に1つのデータだけ送る場合はCo=0となり、

  • Instruction Write operation
    • | Co=0 | Rs=1 | 0 | 0 | 0 | 0 | 0 | 0 |
    • = 0x40
  • Data Write operation
    • | Co=0 | Rs=0 | 0 | 0 | 0 | 0 | 0 | 0 |
    • = 0x00

ということらしい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0