PCA9665_3 © NXP B.V. 2008. All rights reserved.
Product data sheet Rev. 03 — 12 August 2008 31 of 90
NXP Semiconductors
PCA9665
Fm+ parallel bus to I
2
C-bus controller
8.4 Buffered mode
8.4.1 Master Transmitter Buffered mode
In the Master Transmitter Buffered mode, a number of data bytes are transmitted to a
slave receiver several bytes at a time (see Figure 11). Before the Master Transmitter
Buffered mode can be entered, I2CCON must be initialized as shown in Table 33.
ENSIO must be set to logic 1 to enable the PCA9665. If the AA bit is reset, the PCA9665
will not acknowledge its own slave address in the event of another device becoming
master of the bus (in other words, if AA is reset, the PCA9665 cannot enter a slave mode).
STA, STO, and SI must be reset. Once ENSIO has been set to logic 1, it takes about
550 µs for the oscillator to start up.
The Master Transmitter Buffered 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+W)
followed by the number of data bytes to be sent. The byte count register (I2CCOUNT) has
been previously programmed with the number of bytes that need to be sent in a single
sequence (BC[6:0]) as shown in Table 34. LB bit is only used for the Receiver Buffered
modes and can be programmed to either logic 0 or logic 1. The total number of bytes
loaded in I2CDAT (slave address with direction bit plus data bytes) must be equal to the
value programmed in I2CCOUNT. 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 with the direction bit and part of or all the following bytes 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:
18h if an acknowledgment bit (ACK) has been received for the slave address with
direction bit (happens only if I2CCOUNT = 1; no data bytes have been sent).
20h if a no acknowledgment bit (NACK) has been received for the slave address with
direction bit (no data bytes have been sent).
28h if the slave address with direction bit and all the data bytes have been transmitted
and an acknowledgement bit has been received for each of them (number of bytes
sent is equal to value in I2CCOUNT).
Table 33. I2CCON initialization (Buffered mode)
Bit 7 6 5 4 3 2 1 0
Symbol AA ENSIO STA STO SI reserved reserved MODE
Value X1000XX1
Table 34. I2CCOUNT programming
Bit 7 6 5 4 3 2 1 0
Symbol LB BC6 BC5 BC4 BC3 BC2 BC1 BC0
Value X number of bytes received in a single sequence (1 byte to 68 bytes)
PCA9665_3 © NXP B.V. 2008. All rights reserved.
Product data sheet Rev. 03 — 12 August 2008 32 of 90
NXP Semiconductors
PCA9665
Fm+ parallel bus to I
2
C-bus controller
30h if the slave address with direction bit has been successfully sent and no
acknowledgement (NACK) has been received while transmitting the data bytes
(number of total bytes sent is lower than or equal to value in I2CCOUNT).
38h if the PCA9665 lost the arbitration when sending the slave address with the
direction bit or when sending data bytes.
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 35.
ENSIO is not affected by the serial transfer and is not referred to in Table 35.
After a repeated START condition (state 10h), the PCA9665 may switch to the Master
Receiver mode by loading I2CDAT with SLA+R).
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 33 of 90
NXP Semiconductors
PCA9665
Fm+ parallel bus to I
2
C-bus controller
(1) See Table 35
(2) Serial interrupt that occurs when BC[6:0] = 01. No serial interrupt if BC[6:0] > 01.
(3) Defined state when the number of bytes sent is equal to the value in I2CCOUNT register and an ACK has been received for all
the bytes sent.
(4) Defined state when a NACK received while number of bytes sent is lower than or equal to value in I2CCOUNT register.
(5) Master Receiver Byte mode is entered when MODE = 0. Master Receiver Buffered mode is entered when MODE = 1.
Remark: The master should never transmit its own slave address.
Fig 11. Format and states in the Master Transmitter Buffered mode (MODE = 1)
08h
S SLA W A
DATA
A P
28h F8h
MT
10h
S SLA W
R
to MST/REC mode
entry = MR
(5)
A P
30h F8h
A P
20h F8h
002aab659
A or A
38h
other MST
continues
A or A
38h
other MST
continues
A
B0h
other MST
continues
68h
to corresponding states in Slave Transmitter mode
to corresponding states in Slave Receiver mode
successful
transmission
to a Slave Receiver
next transfer started with a
repeated START condition
Not Acknowledge received after
the slave address
Not Acknowledge received after
a data byte
arbitration lost in slave address
or data byte
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
D8h
to corresponding states in Slave Receiver mode (General Call)
(3)
(4)
18h
(2)

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