This example project demonstrates I2C communication between I2C master (SCB mode) and I2C slave (SCB mode).
Development Kit Configuration:
- This project is written for a 2X16 LCD display as there is one available in the Cypress kit CY8CKIT-001.
- Build the project and program the hex file on to PSoC 4 device using MiniProg3.
- Connect I2C Master and I2C Slave pins as shown on the schematic to create I2C bus. The external pull-up resistors have to be connected to the I2C bus. For more information, please refer to the "External Electrical Connections" of the datasheet.
- Connect P0 to SW1 and P1 to SW2.
- Power cycle the device.
- Press SW1 to update and write message to the I2C slave.
- Press SW2 to read back and display message from the I2C slave.
- Observe the results on the LCD.
Project Setting: The example project consists of the I2C and Character LCD components. The Character LCD component (default configuration) is used to display the data written and read by the I2C component. When switch SW1 is pressed the I2C master writes a corresponding message to the I2C slave and when switch SW2 is pressed the I2C master will read back the data from the I2C slave component. Both the written and read back data are displayed on LCD if both write and read operations happens successfully. The Character LCD legend is described in the main.c file
Most Users Ever Online: 66
Currently Online: Hyotor
Currently Browsing this Page:
Bob Marlowe: 1509
Guest Posters: 0
Newest Members:CarrollBibly, Fomocpe, bertalb18, radiovan, otDavid, Hyotor, IgnacioHof, ShotbHab, Moxonft, olgalove90
Administrators: HazAdmin: 67