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

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 3 : P89LV51 <--> PCA9564 <--> P89LPC932
// Through Pushbuttons, Byte to be sent to LPC932 can be programmed
// Once done, a pushbutton sends the LPC932 I2C address + programmed byte
//****************************************************************************
static bdata BYTE LS0 = 0;
sbit LS0_0 = LS0^0;
sbit LS0_1 = LS0^1;
sbit LS0_2 = LS0^2;
sbit LS0_3 = LS0^3;
sbit LS0_4 = LS0^4;
sbit LS0_5 = LS0^5;
sbit LS0_6 = LS0^6;
sbit LS0_7 = LS0^7;
static bdata BYTE LS1 = 0;
sbit LS1_0 = LS1^0;
sbit LS1_1 = LS1^1;
sbit LS1_2 = LS1^2;
sbit LS1_3 = LS1^3;
sbit LS1_4 = LS1^4;
sbit LS1_5 = LS1^5;
sbit LS1_6 = LS1^6;
sbit LS1_7 = LS1^7;
static bdata BYTE DataByteLPC932 = 0xFF;
sbit DataByteLPC932_0 = DataByteLPC932^0;
sbit DataByteLPC932_1 = DataByteLPC932^1;
sbit DataByteLPC932_2 = DataByteLPC932^2;
sbit DataByteLPC932_3 = DataByteLPC932^3;
sbit DataByteLPC932_4 = DataByteLPC932^4;
sbit DataByteLPC932_5 = DataByteLPC932^5;
sbit DataByteLPC932_6 = DataByteLPC932^6;
sbit DataByteLPC932_7 = DataByteLPC932^7;
void LV51_LPC932(void)
{
I2C_Write(&Message1);
Buffer4[0] = 0x00;
Buffer4[1] = 0xFF;
I2C_Write(&Message4);
int BitCounter = 1;
int ValueToBeChanged = 0;
Init_LPC932();
Message1.address = PCA9531_WR;
Message1.buf
Message1.nrBytes = 7;
Buffer1[0]
Buffer1[1]
Buffer1[2]
Buffer1[3]
Buffer1[4]
Buffer1[5]
Buffer1[6]
I2C_Write(&Message1);
LED2 = 1;
LED3 = 1;
DataByteLPC932 = 0xFF;
LS0 = 0;
LS1 = 0;
while (Buffer3[0]!=0x7F)
{
GPIO_Interrupt_Handler();
if (Buffer3[0]!=0xFF)
{
switch (Buffer3[0])
{
case 0x7F : break;
case 0xF7 : BitCounter = 1;
= Buffer1;
= 0x11;
= 0x80;
= 0x80;
= 0x80;
= 0x80;
= 0x00;
= 0x00;
LS0 = 0x00;
LS1 = 0x00;
Message1.nrBytes = 3;
Buffer1[0] = 0x15;
Buffer1[1] = 0x00;
Buffer1[2] = 0x00;
// Initialization of LPC932 (narrowed search address + LEDs off
// Initialization of PCA9531
// autoincrement + register 1
// default prescaler pwm0
// default duty cycle for pwm0
// default prescaler pwm1
// default duty cycle for pwm1
// LD1 to LD4 off
// LD5 to LD8 off
// LD[1:8] off
// 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
// Reset programming (all LEDs are off) - S4 pushed
// subaddress = 0x05
// LS0 = 0x00 - All LEDs off
// LS1 = 0x00 - All LEDs off
// send new data to PCA9531 (3 bytes)
// Command to program
// LPC932 all LEDs off when leaving Program 3
31
off
off
LEDs

Related parts for OM6277,598