You are here

CE95314 - PSoC® 3, PSoC 4, and PSoC 5LP EZI2C | Cypress Semiconductor

CE95314 - PSoC® 3, PSoC 4, and PSoC 5LP EZI2C

Last Updated: 
Jul 19, 2017
Version: 
*B
These code examples demonstrate the usage of the EZI2C slave and I2C master Components in PSoC 3, PSoC 4, and PSoC 5LP.

Overview

These code examples show how two I2C Components – EZI2C slave and I2C master – communicate with each other. Normally, these Components would be on separate devices, but for this example project, they are on the same PSoC chip. An off-chip connection is made between them.

There are two examples:

  • For PSoC 3 and PSoC 5LP, running on a kit with two buttons and a character LCD, such as the Cypress CY8CKIT-030 and CY8CKIT-050 kits.
  • For PSoC 4200, running on the Cypress CY8CKIT-042 kit, which has one button and an RGB LED.

Each I2C Component maintains its own data buffer. Note that an EZI2C buffer can be defined such that only the first N bytes are writeable by the master and the remaining bytes are read-only. This functionality is demonstrated in this example.

Requirements

Tool: PSoC Creator™ 4.1.
Programming Language: C: GCC 5.4-1026-q2-update or MDK/armcc for PSoC 4200 and PSoC 5LP; DP 8051 Keil 9.5.1 for PSoC3
Associated Parts: All PSoC 3, PSoC 4200, and PSoC 5LP parts
Related Hardware: CY8CKIT-030, CY8CKIT-042, CY8CKIT-050