Programming Model
MOTOROLA
I2C Modules
18-9
Table 18-8 MBCR Bit Descriptions
BIT NAME
DESCRIPTION
IEN
The I2C Enable bit controls the software reset of the entire I2C module.
1 = The I2C module is enabled. This bit must be set before any other MBCR bits have any
effect.
0 = The module is disabled, but registers can still be accessed.
If the I2C module is enabled in the middle of a byte transfer, the interface behaves as follows:
The slave mode ignores the current transfer on the bus and starts operating whenever a
subsequent start condition is detected. Master mode will not be aware that the bus is busy;
therefore, if a start cycle is initiated, the current bus cycle can become corrupt. This
ultimately results in either the current bus master or the I2C module losing arbitration, after
which bus operation returns to normal.
IIEN
I2C Interrupt Enable
1 = Interrupts from the I2C module are enabled. An I2C interrupt occurs provided the IIF bit
in the status register is also set.
0 = Interrupts from the I2C module are disabled. This does not clear any currently pending
interrupt condition.
MSTA
At reset, the Master/Slave Mode Select Bit is cleared. When this bit is changed from 0 to 1, a
START signal is generated on the bus, and the master mode is selected. When this bit is
changed from 1 to 0, a STOP signal is generated and the operation mode changes from
master to slave.
MSTA is cleared without generating a STOP signal when the master loses arbitration.
1 = Master Mode
0 = Slave Mode
MTX
The Transmit/Receive Mode Select Bit selects the direction of master and slave transfers.
When addressed as a slave this bit should be set by software according to the SRW bit in the
status register. In master mode, this bit should be set according to the type of transfer
required. Therefore, for address cycles, this bit will always be high.
1 = Transmit
0 = Receive
TXAK
The Transmit Acknowledge Enable bit specifies the value driven onto SDA during
acknowledge cycles for both master and slave receivers.
Writing this bit only applies when the I2C bus is a receiver, not a transmitter.
1 = No acknowledge signal response is sent (i.e., acknowledge bit = 1)
0 = An acknowledge signal will be sent out to the bus at the 9th clock bit after receiving one
byte data
RSTA
Writing a 1 to the Repeat Start bit will generate a repeated START condition on the bus,
provided it is the current bus master. This bit will always be read as a low. Attempting a
repeated start at the wrong time, if the bus is owned by another master, will result in loss of
arbitration.
1 = Generate repeat start cycle
0 = No repeat start
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.