English
Language : 

AK09912 Datasheet, PDF (26/42 Pages) HuaXinAn Electronics CO.,LTD – 3-axis Electronic Compass
[AK09912]
7.2.2. WRITE Instruction
When the R/W bit is set to “0”, AK09912 performs write operation.
In write operation, AK09912 generates an acknowledge after receiving a start condition and the first byte (slave address)
then receives the second byte. The second byte is used to specify the address of an internal control register and is based on
the MSB-first configuration.
MSB
LSB
A7
A6
A5
A4
A3
A2
A1
A0
Figure 7.7 Register Address
After receiving the second byte (register address), AK09912 generates an acknowledge then receives the third byte.
The third and the following bytes represent control data. Control data consists of 8 bits and is based on the MSB-first
configuration. AK09912 generates an acknowledge after every byte is received. Data transfer always stops with a stop
condition generated by the master.
MSB
LSB
D7
D6
D5
D4
D3
D2
D1
D0
Figure 7.8 Control Data
AK09912 can write multiple bytes of data at a time.
After reception of the third byte (control data), AK09912 generates an acknowledge then receives the next data. If
additional data is received instead of a stop condition after receiving one byte of data, the address counter inside the LSI
chip is automatically incremented and the data is written at the next address.
The address is incremented from 00H to 18H, from 30H to32H, or from 60H to 62H. When the address is between 00H and
18H, the address is incremented 00H  01H  02H  03H  10H  11H ...  18H, and the address goes back to 00H
after 18H. When the address is between 30H and 32H, the address goes back to 30H after 32H. When the address is
between 60H and 62H, the address goes back to 60H after 62H.
Actual data is written only to Read/Write registers (refer to Table 8.2)
SDA
S
T
A
R/W="0"
R
T
S
Slave
Address
Register
Address(n)
A
C
K
Data(n)
A
C
K
Data(n+1)
A
A
C
C
K
K
Figure 7.9 WRITE Instruction
S
T
O
P
Data(n+x)
P
A
A
C
C
K
K
MS1547-E-02
- 26 -
2014/7