Ce site contient essentiellement des notes de travail. Le contenu est en constante évolution, et loin d'être achevé. (+ d'infos)
La plupart des documentations informatiques sont orientées Debian / Ubuntu.

Electronique/Hardware/Sensors/MMC2120MG/Bus Pirate

De Ordinoscope.net
Sauter à la navigation Sauter à la recherche

Décomposition du processus

First cycle START by calling the slave address [0110000] This is 0×30 in the Datasheet.. However ours is 0×60 [ 0×60
Second cycle Master (BP) sends 0×00 as the target address to be written to. 0×00
Third cycle Master (BP) writes to the sensor [00000001] to “wake up” the sensor and then a STOP. 0×01 ]
Fourth cycle Master (BP) sends a START at the Read address. { 0×61
Fifth cycle The MSB of the X channel register appears. r
Sixth cycle The LSB of the X channel register appears. r
Seventh cycle The MSB of the Y channel register appears. r
Eight cycle The LSB of the Y channel register appears. r
Clean up The master sends the STOP command. }

Test

I2C>[0x60 0x00 0x01] {0x61 rrrrrr
NACK
I2C START BIT
WRITE: 0x60 ACK 
WRITE: 0x00 ACK 
WRITE: 0x01 ACK 
I2C STOP BIT
I2C START BIT
WRITE: 0x61 ACK 
READ: 0x07 
READ:  ACK 0xFC 
READ:  ACK 0x08 
READ:  ACK 0x21 
READ:  ACK 0x1A

Références