
MT9M131
www.onsemi.com
45
Appendix A − Serial Bus Description
Registers are written to and read from the MT9M131
through the two-wire serial interface bus. The sensor is
a serial interface slave and is controlled by the serial clock
(SCLK). SCLK is driven by the serial interface master. Data
is transferred into and out of the MT9M131 through the
serial data (SDATA) line. The SDATA line is pulled up to
VDD_IO o f f-chip b y a 1 . 5 kW resistor. Either the slave or the
master device can pull the SDATA line down − the two-wire
serial interface protocol determines which device is allowed
to pull the SDATA line down at any given time.
Protocol
The two-wire serial interface defines several different
transmission codes, as shown in the following sequence:
1. A start bit.
2. The slave device 8-bit address. The SADDR pin is
used to select between two different addresses in
case of conflict with another device. If SADDR is
LOW, the slave address is 0x90; if SADDR is
HIGH, the slave address is 0xBA.
3. An (a no) acknowledge bit.
4. An 8-bit message.
5. A stop bit.
Sequence
A typical READ or WRITE sequence is executed as
follows:
1. The master sends a start bit.
2. The master sends the 8-bit slave device address.
The last bit of the address determines if the request
is a READ or a WRITE, where a “0” indicates
a WRITE and a “1” indicates a READ.
3. The slave device acknowledges receipt of the
address by sending an acknowledge bit to the
master.
4. If the request is a WRITE, the master then
transfers the 8-bit register address, indicating
where the WRITE takes place.
5. The slave sends an acknowledge bit, indicating
that the register address has been received.
6. The master then transfers the data, 8 bits at a time,
with the slave sending an acknowledge bit after
each 8 bits.
The MT9M131 uses 16-bit data for its internal registers,
thus requiring two 8-bit transfers to write to one register.
After 16 bits are transferred, the register address is
automatically incremented so that the next 16 bits are
written to the next register address. The master stops writing
by sending a start or stop bit.
A typical READ sequence is executed as follows.
1. The master sends the write-mode slave address
and 8-bit register address, just as in the write
request.
2. The master then sends a start bit and the
read-mode slave address, and clocks out the
register data, 8 bits at a time.
3. The master sends an acknowledge bit after each
8-bit transfer. The register address is automatically
incremented after every 16 bits is transferred.
4. The data transfer is stopped when the master sends
a no-acknowledge bit.
Bus Idle State
The bus is idle when both the data and clock lines are
HIGH. Control of the bus is initiated with a start bit, and the
bus is released with a stop bit. Only the master can generate
the start and stop bits.
Start Bit
The start bit is defined as a HIGH-to-LOW transition of
the data line while the clock line is HIGH.
Stop Bit
The stop bit is defined as a LOW-to-HIGH transition of
the data line while the clock line is HIGH.
Slave Address
The 8-bit address of a two-wire serial interface device
consists o f seven bits of address and 1 bit of direction. A “0”
in the least significant bit (LSB) of the address indicates
write mode, and a “1” indicates read mode. The write
address o f the sensor is 0xBA; the read address is 0xBB. This
applies only when the SADDR is set HIGH.
Data Bit Transfer
One data bit is transferred during each clock pulse.
The serial interface clock pulse is provided by the master.
The data must be stable during the HIGH period of the
two-wire serial interface clock − it can only change when the
serial clock is LOW. Data is transferred 8 bits at a time,
followed by an acknowledge bit.
Acknowledge Bit
The master generates the acknowledge clock pulse.
The transmitter (which is the master when writing, or the
slave when reading) releases the data line, and the receiver
signals an acknowledge bit by pulling the data line LOW
during the acknowledge clock pulse.
No-Acknowledge Bit
The no-acknowledge bit is generated when the data line is
not pulled down by the receiver during the acknowledge
clock pulse. A no-acknowledge bit is used to terminate
a read sequence.