OM6277,598 NXP Semiconductors, OM6277,598 Datasheet - Page 35

DEMO BOARD FOR PCA9564

OM6277,598

Manufacturer Part Number
OM6277,598
Description
DEMO BOARD FOR PCA9564
Manufacturer
NXP Semiconductors
Datasheet

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
//****************************************************************************
// Program 4:P89LV51 <--> PCA9564 <--> P89LPC932
// Initiates an automatic I2C slave address search in order
// to find P89LPC932's I2C slave address
//****************************************************************************
void I2C_Address_Search(void)
{
}
void Init_LPC932(void)
{
}
bdata BYTE I2C_Address;
LED2 = 1;
LED3 = 1;
while (Buffer3[0]!=0x7F)
{
}
Message4.nrBytes = 2;
Buffer4[0] = 0x00;
I2C_Write(&Message4);
LPC932_WR = Search_Routine(0xDE,0xEE);
LPC932_RD = LPC932_WR + 1;
Message4.address = LPC932_WR;
Message4.buf
Message4.nrBytes = 2;
Buffer4[0] = 0x00;
Buffer4[1] = 0xFF;
I2C_Write(&Message4);
Buffer4[1] = 0xFF;
GPIO_Interrupt_Handler();
if (Buffer3[0]!=0xFF)
{
}
switch (Buffer3[0])
{
}
case 0x7F : break;
case 0xFE : I2C_Address = Search_Routine(0x00,0xFE);
case 0xFD : Search_Successful = 0;
= Buffer4;
if (Search_Successful == 0)
{
}
Buffer3[0] = 0xFF;
if (Search_Successful == 1)
{
}
break;
LED2 = 1;
LED3 = 1;
Message4.address = LPC932_WR;
Message4.buf
Message4.nrBytes = 2;
Buffer4[0] = 0x00;
Buffer4[1] = 0xFF;
I2C_Write(&Message4);
Message4.nrBytes = 1;
Buffer4[0] = 0xEE;
I2C_Write(&Message4);
Buffer3[0] = 0xFF;
break;
LED2 = 1;
LED3 = 0;
LED2 = 0;
LED3 = 1;
LPC932_WR = I2C_Address;
LPC932_RD = LPC932_WR + 1;
Message4.address = LPC932_WR;
Message4.buf
Message4.nrBytes = 2;
Buffer4[0] = 0x00;
Buffer4[1] = ~LPC932_WR;
I2C_Write(&Message4);
// Command byte to program LEDs
// LPC932 all LEDs off
// LD[13:20] off
// Command to program
// LPC932 all LEDs off when leaving Program 3
= Buffer4;
= Buffer4;
// Reset of the previous search, LPC932 scans and stores its I2C address
// LD11 is
// LD12 is
// Main loop as long as S8 (exit Program) has not been pushed
// Check if an action on pushbutton happened
// execute the command associated with the action on pushbutton
// Exit Program 3 - S8 pushed
// Search failed (the all I2C address range has been checked
// Search successful
// Command byte to program the LEDs
// LD[13:20] display the found address
// Program LPC932 (2 bytes)
// Command byte to program the LEDs
// LD[13:20] off
// Program LPC932 (2 bytes)
// Command byte to scan and store the new I2C address
// Program LPC932 (1 byte)
LEDs
35
off
off

Related parts for OM6277,598