KMA199 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Product data sheet Rev. 2 — 7 December 2011 19 of 36
NXP Semiconductors
KMA199
Programmable angle sensor
13.3.1 Write access
To write data to the EEPROM, the internal charge pump must be enabled by setting the
bits EEP_CP_CLOCK_EN and EEP_WRITE_EN and waiting for t
cp
. The following
procedure must be performed:
Start condition: The master drives a rising edge after a LOW level
Command: The master sends a write command (CMD0 = 0)
Data: The master sends two data bytes
Stop condition: The master drives a rising edge after a LOW level
Figure 15
shows the write access of the digital interface. The signal OWI represents the
data on the bus from the master or slave. The signals master output enable and slave
output enable just symbolize if the master or the slave output is enabled or disabled,
respectively.
Note: As already mentioned in Section 13.1, the command mode has to be entered using
the write procedure. If command mode is not entered, digital communication is not
possible and the sensor operates in normal operating mode. After changing an address,
the time t
prog
must elapse before changing another address. Finally the checksum must
be recalculated and written, after changing the contents of the EEPROM
(see Section 13.4
).
(1) Missing rising edges generate a time-out condition and the written data is ignored.
(2) If the master does not drive the bus, the bus is defined by the bus-pull.
Fig 15. OWI write access
001aag743
master
output
enable
slave
output
enable
START CMD7 CMD0 STOP
(1)
(2)
IDLEWDATA15 WDATA0
OWI
KMA199 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Product data sheet Rev. 2 — 7 December 2011 20 of 36
NXP Semiconductors
KMA199
Programmable angle sensor
13.3.2 Read access
To read data from the sensor, the following procedure must be performed:
Start condition: The master drives a rising edge after a LOW level
Command: The master sends a read command (CMD0 = 1)
Handover: The master sends a handover bit, that is a logic 0 and disables the output
after a three-quarter bit period
Takeover: The slave drives a LOW level after the falling edge for t
tko(slv)
Data: The slave sends two data bytes
Handover: The slave sends a handover bit, that is a logic 0 and disables the output
after a three-quarter bit period
Takeover: The master drives a LOW level after the falling edge for t
tko(mas)
Stop condition: The master drives a rising edge after a LOW level
Figure 16
shows the read access of the digital interface. The signal OWI represents the
data on the bus from the master or slave. The signals master output enable and slave
output enable just symbolize if the master or the slave output is enabled or disabled,
respectively.
(1) Duration of LOW level for slave takeover t
tko(slv)
.
(2) There is an overlap in the output enables of master and slave, because both drive a LOW level.
However this ensures the independency from having a pull-up or pull-down on the bus. In addition
it improves the ElectroMagnetic Compatibility (EMC) robustness, because all levels are actively
driven.
(3) Duration of LOW level for master takeover t
tko(mas)
.
(4) If the master does not take over and a pull-up exists, the stop condition is generated by the pull-up.
Otherwise a time-out is generated if there is a pull-down and the slave waits for a rising edge as
start condition.
(5) If the master does not drive the bus, the bus is defined by the bus-pull.
Fig 16. OWI read access
001aag744
master
output
enable
slave
output
enable
START CMD7 CMD0 RDATA0
(1)
(2) (2) (4)
(5)
(3)
HANDSHAKE HANDSHAKERDATA15 IDLESTOP
OWI
KMA199 All information provided in this document is subject to legal disclaimers. © NXP B.V. 2011. All rights reserved.
Product data sheet Rev. 2 — 7 December 2011 21 of 36
NXP Semiconductors
KMA199
Programmable angle sensor
13.3.3 Entering the command mode
After a power-on reset, the sensor provides a time slot t
cmd(ent)
for entering the command
mode. A specific command sequence has to be send (see Figure 17
). If command mode
is not entered, the sensor starts in the normal operating mode. However the signature can
be written by the master, if the sensor switches to diagnostic mode.
During the command mode sequence, the analog output is enabled. The external
programming hardware has to overdrive the output with the current I
od
. If command mode
is activated, the analog output is disabled and pin OUT/DATA operates as a digital
interface.
13.4 Cyclic redundancy check
As already mentioned in Section 7, there is an 8-bit checksum for the EEPROM data.
To calculate this value, the CRC needs to be generated with the MSB of the EEPROM
data word at first over all corresponding addresses in increasing order.
All addresses from 0h to Fh have to be read out for calculating the checksum. The Least
Significant Byte (LSB) of address Fh which contains the previous checksum must be
overwritten with 0h before the calculation can be started.
Finally, the internal charge pump has to be enabled for programming by setting the bits
EEP_CP_CLOCK_EN and EEP_WRITE_EN (see Table 16
) and waiting for t
cp
.
The generator polynomial for the calculation of the checksum is:
(9)
With a start value of FFh and the data bits are XOR at the x
8
point.
Fig 17. OWI command mode procedure
001aag819
t
cmd(ent)
signaturecommand
STARTOWI
V
DD
94h 9Bh A4h STOP
Gx() x
8
x
2
x1+++=

KMA199,115

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
Magnetic Sensors Board Mount Hall Effect / Magnetic Sensors Programble Angle Sensor 5V 5mA-10mA
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet