- ページ 10

アクセサリー Digilent Pmod CMPS2のPDF リファレンス・マニュアルをオンラインで閲覧またはダウンロードできます。Digilent Pmod CMPS2 12 ページ。

Digilent Pmod CMPS2 リファレンス・マニュアル
Pmod CMPS2™ Reference Manual
50. Provide a START condition and call the device ID with a write bit
I2CBegin(0xA0); //device ID 0x30 with a write (0) bit
51. Wait to receive an ACK from the Pmod CMPS2.
52. Send the Internal Control Register 0 (address 0x07) as the register to communicate with
I2CWrite(0x07); //address 0x07 corresponds to Control Register 0
53. Wait to receive an ACK from the Pmod CMPS2.
54. Write the command to take a measurement by setting bit 0 high followed by a STOP bit.
I2CWrite(0x01); //0x01 initiates a data acquisition
55. Delay at least 7.92 mS by default to allow the Pmod CMPS2 to finish collecting data.
56. Provide a START condition and call the device ID with a write bit
I2CBegin(0xA0); //device ID 0x30 with a write (0) bit
57. Wait to receive an ACK from the Pmod CMPS2.
58. Send the Status Register (0x03) as the register to read
I2CWrite(0x03); //indicate you wish to interact with address 0x03
59. Provide a START condition and call the device ID with a read bit
I2CBegin(0xA1); //device ID 0x30 with a read (1) bit
60. Wait to receive an ACK from the Pmod CMPS2.
61. Cycle the SCL line to receive the Status Register data on the SDA line. Keep reading the Status Register by
repeating steps 8 through 13 until bit 0 is set to '1', indicating that the data on all 3 axes as available to be
read.
62. Provide a START condition and call the device ID with a write bit
I2CBegin(0xA0); //device ID 0x30 with a write (0) bit
63. Wait to receive an ACK from the Pmod CMPS2.
64. Send the first register address corresponding to Xout LSB (0x00) as the register to be read.
I2CWrite(0x00); //address 0x00 as the first register to be read
65. Provide a START condition and call the device ID with a read bit
I2CBegin(0xA1); //device ID 0x30 with a read (1) bit
66. Wait to receive an ACK from the Pmod CMPS2.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Arrow.com.
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Downloaded from
Page 10 of 12