MT9V131
www.onsemi.com
14
SERIAL BUS DESCRIPTION
Registers are written to and read from the MT9V131
through the two-wire serial interface bus. The sensor is a
serial interface slave and is controlled by the serial clock
(SCLK), which is driven by the serial interface master. Data
is transferred into and out of the MT9V131 through the serial
data (SDATA) line. The SDATA line is pulled up to 2.8 V
off-chip by a 1.5 KΩ resistor. Either the slave or master
device can pull the SDATA line down—the serial interface
protocol determines which device is allowed to pull the
SDATA line down at any given time. The registers are 16 bits
wide and can be accessed through 16-bit or 8-bit two-wire
serial bus sequences.
Protocol
The two-wire serial interface defines several different
transmission codes, as follows:
•a start bit
•the slave device eight-bit address. SADDR 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 0xB8.
•an acknowledge or a no-acknowledge bit
•an 8-bit message
•a stop bit
Sequence
A typical read or write sequence begins by the master
sending a start bit. After the start bit, the master sends the
slave device’s 8-bit address. The last bit of the address
determines if the request will be a read or a write, where a
“0” indicates a write and a “1” indicates a read. The slave
device acknowledges its address by sending an
acknowledge bit back to the master.
If the request was a write, the master then transfers the
8-bit register address to which a write should take place. The
slave sends an acknowledge bit to indicate that the register
address has been received. The master then transfers the data
8 bits at a time, with the slave sending an acknowledge bit
after each 8 bits. The MT9V131 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. First the
master sends the write-mode slave address and 8-bit register
address, just as in the write request. The master then sends
a start bit and the read-mode slave address. The master then
clocks out the register data 8 bits at a time. The master sends
an acknowledge bit after each 8-bit transfer. The register
address is auto-incremented after every 16 bits is
transferred. The data transfer is stopped when the master
sends a no-acknowledge bit.
The MT9V131 allows for 8-bit data transfers through the
two-wire serial interface by writing (or reading) the most
significant 8 bits to the register and then writing (or reading)
the least significant 8 bits to R0x7F (127).
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 of 7 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 of
the sensor is 0xB8, while the read address is 0xB9; this only
applies when 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 serial
clock - it can only change when the two-wire serial interface
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
indicates 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.