1 Reply Latest reply on Aug 9, 2020 11:55 PM by SampathS_11

    I2C test - A simple program for beginners using Modus Toolbox2.1 with PSoC6(M4)


      Hi all,


      I am making some programs for beginners using Modus ToolBox 2.1. When migrating the development environment from PSoc Creator to Modus, I had a hard time creating a simple program. Especially, there are few simple samples using the Device Configuration tool.

      Here, a simple program for the M4 core of PSoC 6 using the Device Configuration tool of Modus Toolbox2.1 is introduced here.


      The environment is as follows.




      This time it's a simple thing to test I2C of Kit. This test check with I2C that the E-Ink Shield is mounted on your CY8CKIT-062-BLE. The connection destination is scanned with I2C, and 4 bytes data from address 0 is displayed at the I2C address detected by the scan. This program is based on I2C part of Motoo-san’s program, and modified using Device Configration tool.


      Select the CY8CKIT-062-BLE kit from the New Application tool in the Quick Panel and use it based on what was created in the empty PSoC 6 app.

      About the pin setting, start the Device Configuration tool from the Quick Panel in the IDE of Modus Toolbox2.1, and set it according to the following procedure.



      Go to “Peripheral” tab and set Serial Communication Block (SCB) 3 as I2C.

      On the right side of the Peripheral tab, there is a place to set the I2C parameters. Set the Mode and Data Rate.


       Data Rate:100

      Select the input clock source from the pull-down menu.

       Clock Signal:16bit Divider 1 clk


      Add the retarget-io library from Library Manager to display in UART output. The method is introduced in "UART to output with printf() function-A simple program for beginners using Modus Toolbox2.1 with PSoC6(M4)".

      Build is successful and execute this program, UART message is as follows.



      I tried to make the program as simple as possible, but there were various points to control and check, and it became a little complicated. See the attached program for details.