PCA9665_3 © NXP B.V. 2008. All rights reserved.
Product data sheet Rev. 03 — 12 August 2008 22 of 90
NXP Semiconductors
PCA9665
Fm+ parallel bus to I
2
C-bus controller
8.3.2 Master Receiver Byte mode
In the Master Receiver Byte mode, a number of data bytes are received from a slave
transmitter one byte at a time (see Figure 8). The transfer is initialized as in the Master
Transmitter Byte mode.
The Master Receiver Byte mode may now be entered by setting the STA bit. The I
2
C-bus
state machine will first test the I
2
C-bus and generate a START condition as soon as the
bus becomes free. When a START condition is transmitted, the Serial Interrupt flag (SI) is
set, the Interrupt line (INT) goes LOW and the status code in the status register (I2CSTA)
will be 08h. This status code must be used to vector to an interrupt service routine that
loads I2CDAT with the slave address and the data direction bit (SLA+R). A write to
I2CCON resets the SI bit, clears the Interrupt (INT goes HIGH) and allows the serial
transfer to continue.
When the slave address and the data direction bit have been transmitted, the serial
interrupt flag (SI) is set again, the Interrupt line (INT) goes LOW again and I2CSTA is
loaded with the following possible codes:
40h if an acknowledgment bit (ACK) has been received for the slave address with
direction bit
48h if a no acknowledgment bit (NACK) has been received for the slave address with
direction bit
38h if the PCA9665 lost the arbitration
B0h if the PCA9665 lost the arbitration and is addressed as a slave transmitter (slave
mode enabled with AA = 1)
68h if the PCA9665 lost the arbitration and is addressed as a slave receiver (slave
mode enabled with AA = 1)
D8h if the PCA9665 lost the arbitration and is addressed as a slave receiver during a
General Call sequence (slave mode enabled with AA = 1 and General Call address
enabled with GC = 1 in I2CADR register).
The appropriate action to be taken for each of these status codes is detailed in Table 28.
ENSIO is not affected by the serial transfer and is not referred to in Table 28.
After a repeated START condition (state 10h), the PCA9665 may switch to the Master
Transmitter mode by loading I2CDAT with SLA+W.
Remark: A master should not transmit its own slave address.
PCA9665_3 © NXP B.V. 2008. All rights reserved.
Product data sheet Rev. 03 — 12 August 2008 23 of 90
NXP Semiconductors
PCA9665
Fm+ parallel bus to I
2
C-bus controller
(1) See Table 28.
(2) Defined state when a single byte is received and an ACK is sent (AA = 1).
(3) Defined state when a single byte is received and a NACK is sent (AA = 0).
(4) Master Transmitter Byte mode is entered when MODE = 0. Master Transmitter Buffered mode is entered when MODE = 1.
Fig 8. Format and states in the Master Receiver Byte mode (MODE = 0)
08h
S SLA R A
DATA
A P
40h
50h F8h
MR
10h
S SLA R
W
to Master Transmitter mode
entry = MT
(4)
A P
48h F8h
002aab025
A
38h
other MST
continues
A or A
38h
other MST
continues
A
other MST
continues
successful
reception from
a Slave Transmitter
next transfer started with a
repeated START condition
Not Acknowledge received after
the slave address
arbitration lost in slave address
or Acknowledge bit
arbitration lost and addressed as slave
n
This number (contained in I2CSTA) corresponds
to a defined state of the I
2
C-bus.
(1)
DATA
A
any number of data bytes and
their associated Acknowledge bits
from master to slave
from slave to master
DATA A
58h
(2) (3)
B0h
68h
to corresponding states in Slave Transmitter mode
to corresponding states in Slave Receiver mode
D8h
to corresponding states in Slave Receiver mode (General Call)
PCA9665_3 © NXP B.V. 2008. All rights reserved.
Product data sheet Rev. 03 — 12 August 2008 24 of 90
NXP Semiconductors
PCA9665
Fm+ parallel bus to I
2
C-bus controller
Table 28. Master Receiver Byte mode (MODE = 0)
Status
code
(I2CSTA)
Status of the
I
2
C-bus and the
PCA9665
Application software response Next action taken by the PCA9665
To/from I2CDAT To I2CCON
STA STO SI AA MODE
08h A START condition
has been
transmitted
Load SLA+R X X 0 X 0 SLA+R will be transmitted;
ACK/NACK bit will be received
10h A repeated START
condition has been
transmitted
Load SLA+R or X X 0 X 0 SLA+R will be transmitted;
ACK/NACK bit will be received
Load SLA+W X X 0 X 0 SLA+W will be transmitted;
PCA9665 will be switched to
Master Transmitter Byte mode
38h Arbitration lost in
NACK bit
No I2CDAT action
or
000X0 I
2
C-bus will be released;
PCA9665 will enter a slave mode
no I2CDAT action 1 0 0 X 0 A START condition will be
transmitted when the bus becomes
free
40h SLA+R has been
transmitted; ACK
has been received
No I2CDAT action
or
0 0 0 0 0 Data byte will be received;
NACK bit will be returned
no I2CDAT action 0 0 0 1 0 Data byte will be received;
ACK bit will be returned
48h SLA+R has been
transmitted; NACK
has been received
No I2CDAT action
or
1 0 0 X 0 Repeated START condition will be
transmitted
no I2CDAT action
or
0 1 0 X 0 STOP condition will be transmitted;
STO flag will be reset
no I2CDAT action 1 1 0 X 0 STOP condition followed by a START
condition will be transmitted;
STO flag will be reset
50h Data byte has been
received; ACK has
been returned
Read data byte or 0 0 0 0 0 Data byte will be received;
NACK bit will be returned
read data byte 0 0 0 1 0 Data byte will be received;
ACK bit will be returned
58h Data byte has been
received; NACK has
been returned
Read data byte or 1 0 0 X 0 Repeated START condition will be
transmitted
read data byte or 0 1 0 X 0 STOP condition will be transmitted;
STO flag will be reset
read data byte 1 1 0 X 0 STOP condition followed by a START
condition will be transmitted;
STO flag will be reset

PCA9665N,112

Mfr. #:
Manufacturer:
NXP Semiconductors
Description:
IC CNTRLR PARALLEL/I2C 20-DIP
Lifecycle:
New from this manufacturer.
Delivery:
DHL FedEx Ups TNT EMS
Payment:
T/T Paypal Visa MoneyGram Western Union

Products related to this Datasheet