OM6277,598 NXP Semiconductors, OM6277,598 Datasheet - Page 25
![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
}
//****************************************************************************
// GPIO Interrupt Handling function
// One shot mode (through /INT) or
// permanent action detection (then Input PCA9554 Reg# polling)
//****************************************************************************
{
}
/****************************************************************************
// Program 1: P89LV51 <--> PCA9564 <--> PCA9531
// Through Pushbuttons, BR0 and BR1 can be selected
// Once BR selected, PSC and PWM registers
// can be incremented / decremented
//****************************************************************************
static
void Blinker_Up_Down(void)
{
void GPIO_Interrupt_Handler(void)
}
return I2C_Address_Write;
Message2.address
Message2.buf
Message2.nrBytes
Buffer2[0]
Message3.address
Message3.buf
Message3.nrBytes
if (PCA9554_Int==0)
{
}
if (Trigger_GPIO_Polling == 1)
{
}
idata BYTE Frequency_0;
idata BYTE DutyCycle_0;
idata BYTE Frequency_1;
idata BYTE DutyCycle_1;
LED2 = 1;
LED3 = 0;
Address_Sent_Status = 0x00;
Command_Sent_Status = 0x00;
I2C_WriteRepRead(&Message2,&Message3); // 1st read the PCA9554
if (Buffer3[0] != 0xFF)
{
}
InsertDelay(255);
InsertDelay(255);
InsertDelay(255);
I2C_WriteRepRead(&Message2,&Message3); // 2nd read the PCA9554
Snapshot_2 = Buffer3[0];
{
}
else
{
}
I2C_WriteRepRead(&Message2,&Message3);
if (Snapshot_1 == Snapshot_2)
case 0x20 : // no Ack received
}
Snapshot_1 = Buffer3[0];
Trigger_GPIO_Polling = 1;
Trigger_GPIO_Polling = 0;
Buffer3[0] = Snapshot_1;
int BR_Select = 0;
}
else
{
}
break;
PCA9564_Write(I2CCON,0xD0 | CRX);
break;
Search_Successful = 0;
= PCA9554_WR;
= Buffer2;
= 1;
= 0;
= PCA9554_RD;
= Buffer3;
= 1;
// LD11
// LD12
// Compare the 2 read data in the temp memories
// subaddress = 0
// read one byte
// Action on pushbutton detected
// load the 1st read data in a temp memory
// Delay between 2 snapshots to detect if pushbutton is
// still pressed or has been released
// load the 2nd read data in a temp memory
// permanent push detected when 1st and 2nd readings equal
// single shot action when 1st and 2nd readings different
// Buffer loaded again with the initial push value
// Start Polling PCA9554 when permanent push detected
off
on --> PCA9531 programmed with default blinking rate
25
// Search unsuccessful if Read Data != Address
// I2CCON=11010xxx -> Stop condition