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

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
PCA9564sys.h
//*************************************************************************
//
//
//
//
//
//
// File Name:
// Created:
// Modified:
// Revision:
//
//*************************************************************************
#ifndef __PCA9564SYS_H__
#define __PCA9564SYS_H__
#define MCU_COMMAND 0xFF
#define I2CSTA
#define I2CTO
#define I2CDAT
#define I2CADR
#define I2CCON
// I2CCON = AA + ENSIO + STA + STO + SI + CR2 + CR1 + CR0
#define AA_ENSIO_STA_NOTSTO_NOTSI
#define AA_ENSIO_NOTSTA_STO_NOTSI
#define AA_ENSIO_NOTSTA_NOTSTO_NOTSI 0xC0
#define NOTAA_ENSIO_NOTSTA_NOTSTO_NOTSI 0x40
void PCA9564_Write(unsigned char Reg, unsigned char val);
unsigned char PCA9564_Read(unsigned char Reg);
#endif
PCA9564sys.c
//*************************************************************************
//
//
//
//
//
//
// File Name:
// Created:
// Modified:
// Revision:
//
//*************************************************************************
#include <REG51RX.H>
//#include "BasicTyp.h"
#include "PCA9564sys.h"
sbit A0
sbit A1
sbit Reset9564 = P3^4;
// +---------------------------------------------+
// | PCA9564 register commands
// +---------------------------------------------+
void PCA9564_Write(unsigned char Reg, unsigned char val)
{
}
A0 = Reg & 0x01;
A1 = Reg & 0x02;
AUXR = 0x02;
*((unsigned char pdata *)MCU_COMMAND) = val;
AUXR = 0x00;
= P2^0;
= P2^1;
COPYRIGHT (c)
COPYRIGHT (c)
PCA9564sys.h
June 2, 2003
June 4, 2003
1.00
PCA9564sys.C
June 2, 2003
June 10, 2003
1.00
0x00
0x00
0x01
0x02
0x03
P H I L I P S
P H I L I P S
--
--
ALL RIGHTS RESERVED
ALL RIGHTS RESERVED
2003 BY PHILIPS SEMICONDUCTORS
2003 BY PHILIPS SEMICONDUCTORS
// special function register declarations
// dummy address
// PCA9564 Status Register
// PCA9564 Timeout Register
// PCA9564 Data Register
// PCA9564 Address Register
// PCA9564 Control Register
P R O P R I E T A R Y
P R O P R I E T A R Y
// Access external memory, emit/don't emit ALE --> emit when using emulator
// Access internal memory, emit ALE when using emulator
0xE0
0xD0
--
--
// Generate Start
// Generate Stop
// Release bus and Ack + set to slave receiver
// Release bus and NOT Ack
43

Related parts for OM6277,598