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

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
Appendix 2: P89LPC932 Microcontroller Source Code – Rev 1.0
Main.c
//***************************************************************************
//*
//*
//*
//*
//***************************************************************************
#include <Reg932.h>
#include "ua_exprt.h"
//***************************************************************************
//* Definitions
//***************************************************************************
typedef unsigned char
typedef unsigned short
//***************************************************************************
//* Functions
//***************************************************************************
void init(void);
//***************************************************************************
//* init()
//* Input(s) :
//* Returns :
//* Description :
//***************************************************************************
void init(void)
{
}
//***************************************************************************
//* main()
//* Input(s) : none.
//* Returns : none.
//* Description : main loop
//***************************************************************************
void main(void)
{
}
P0M1 = 0x00;
P1M1 = 0x0C;
init();
}
P1M2 = 0x0C;
P2M1 = 0x00;
har temp;
I2C_Init();
EA
while(1)
{
}
main.c
Date :
Discription :
switch(slaveBuf[0])
{
break;
= 1;
case(0x00):
{
}
break;
case(0xEE):
{
}
break;
case(0xFF):
{
}
break;
default:
{
}
P2 = slaveBuf[1];
temp = P0;
temp &= 0x07;
temp <<= 1;
I2ADR = (0xE0 | temp);
slaveBuf[0] = I2ADR;
none.
none.
initialization of P89LPC903
July 2003
Using I2Cslave code to interact with the
PCA9564 on the I2C-bus
BYTE;
WORD;
// P0 in Quasi bi mode
// P1 in Quasi bi mode
// P1.2 P13 open drain
// P2 in Quasi bi mode
// initialize P89LPC932
// initialize I2C block
// enable interrupts
// main loop
// switch on first byte received
// Command 00, write byte to P2
// command EE, change address
// according jumper settings
// mask out non address bits
// shift left one
// generate I2C address depending on P0
// command FF, send back I2C slave address
45

Related parts for OM6277,598