OM6277,598 NXP Semiconductors, OM6277,598 Datasheet - Page 39
OM6277,598
Manufacturer Part Number
OM6277,598
Description
DEMO BOARD FOR PCA9564
Manufacturer
NXP Semiconductors
Datasheet
1.OM6277598.pdf
(52 pages)
Specifications of OM6277,598
Main Purpose
Interface, I2C Controller
Embedded
Yes, MCU, 8-Bit
Utilized Ic / Part
PCA9564
Primary Attributes
I2C Bus Controller, 1 8-Bit GPIO, 1 8-Bit LED Dimmer
Secondary Attributes
8 Momentary Switches, 23 LEDs
Lead Free Status / RoHS Status
Not applicable / Not applicable
Other names
568-4001
935283226598
935283226598
}
}
case 0x20 : // no Ack received
case 0x28 : // ack received
case 0x30 : // no ACK for data byte
case 0x38 : // arbitration lost -> not addressed as slave
// MASTER RECEIVER FUNCTIONS
case 0x40 : // ACK for slave address + R
case 0x48 : // no ACK for slave address + R
case 0x50 : // ACK for data byte
case 0x58 : // no ACK for data byte
default :
// switch - PCA9564_Status
// i2c_isr
PCA9564_Write(I2CCON,0xD0 | CRX);
drvStatus = I2C_ERROR;
break;
if (dataCount < msg->nrBytes)
{
}
else
{
}
break;
PCA9564_Write(I2CCON,0xD0 | CRX);
drvStatus = I2C_ERROR;
break;
PCA9564_Write(I2CCON,0xE0 | CRX);
drvStatus = I2C_ARBITRATION_LOST;
break;
if (msg->nrBytes>1)
{
}
else
{
}
break;
PCA9564_Write(I2CCON,0xD0 | CRX);
drvStatus = I2C_ERROR;
break;
msg->buf[dataCount++] = PCA9564_Read(I2CDAT);
if (dataCount + 1 < msg->nrBytes)
{
}
else
{
}
break;
msg->buf[dataCount++] = PCA9564_Read(I2CDAT);
PCA9564_Write(I2CCON,0xD0 | CRX);
drvStatus = I2C_OK;
break;
// undefined error
PCA9564_Write(I2CCON,0xD0 | CRX);
drvStatus = I2C_ERROR;
break;
PCA9564_Write(I2CDAT,msg->buf[dataCount++]);
PCA9564_Write(I2CCON,0xC0 | CRX);
if (msgCount < tfr->nrMessages)
{
}
else
{
}
PCA9564_Write(I2CCON,0xC0 | CRX);
PCA9564_Write(I2CCON,0x40 | CRX);
PCA9564_Write(I2CCON,0xC0 | CRX);
PCA9564_Write(I2CCON,0x40 | CRX);
dataCount = 0;
msg = tfr->p_message[msgCount++];
PCA9564_Write(I2CDAT,msg->address);
PCA9564_Write(I2CCON,0xE0 | CRX);
PCA9564_Write(I2CCON,0xD0 | CRX);
drvStatus = I2C_OK;
// if
// if
39
// I2CCON=11010xxx -> Stop condition
// I2CCON=11000xxx -> release interrupt
// I2CCON=11100xxx = start
// I2CCON=11010xxx
// I2CCON=11010xxx -> stop condition
// I2CCON=11100xxx -> send start again
// I2CCON=11000xxx -> acknowledge byte
// I2CCON=01000xxx -> return NACK
// I2CCON=11010xxx -> send stop
// I2CCON=11000xxx
// I2CCON=01000xxx
// I2CCON=11010xxx -> send Stop
// I2CCON=11000xxx -> send stop