OM6277,598 NXP Semiconductors, OM6277,598 Datasheet - Page 40
![DEMO BOARD FOR PCA9564](/photos/9/8/90802/om6277_sml.jpg)
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
/************************************************************************************
* Input(s):
*
*
* Output(s):
* Returns:
* Description:
*
*************************************************************************************/
void I2C_Transfer(I2C_TRANSFER *p, void (*proc)(BYTE status, BYTE msgsDone))
{
}
/* ********************************************************************
* Input(s):
* Output(s):
* Returns:
* Description:
**********************************************************************/
void I2C_InitializeMaster(BYTE speed)
{
}
int i;
tfr
readyProc = proc;
msgCount
dataCount = 0;
master
msg = tfr->p_message[msgCount++];
state
PCA9564_Write(I2CCON,0xE0 | CRX);
state
readyProc = 0;
masterProc = HandleMasterState;
PCA9564_Write(I2CADR,0xFE);
CRX = speed;
PCA9564_Write(I2CCON,0xC0 | CRX);
for (i=0;i<1000;i++) ;
master
= FALSE;
= p;
= 0;
= TRUE;
= (msg->address & 1) ? ST_AWAIT_ACK : ST_SENDING;
= ST_IDLE;
None.
None.
Start an I2C transfer, containing 1 or more messages. The application must
leave the transfer parameter block untouched until the ready procedure is called.
speed
None.
None.
Initialize the PCA9564 as I2C-bus master.
p
proc
with the driver status passed as parameter.
address of I2C transfer parameter block.
procedure to call when transfer completed,
clock register value for bus speed.
// Null pointer
// Set pointer to correct proc.
// own slave address
// I2C Frequency
// 1100 0xxx -> Set to slave receiver
// 1110 0xxx -> generate Start
40