cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 4 MCU

bojec_3707286
New Contributor

Hello Friends

i'm trying to use i2c sensor and want to show the sensor value in Serial Monitor in PC

So i try 2 SCB ( UART and I2C)  like the screenshot

pastedImage_0.png

and wrote code like this

#include "project.h"

//#define I2C_SLAVE_ADDR      (0x28u)

int main(void)

{

    CyGlobalIntEnable; /* Enable global interrupts. */

    UART_PC_Start();

    //I2C_Start();

   

    for(;;)

    {

        UART_PC_UartPutString(" PM2008 TEST \r\t" );

        CyDelay(1000);

    }

}

when i did not use i2c block , the monitor gives me correct message for each 1 seconds,

but i use i2c block monitor goes like this

pastedImage_5.png

it gives me a lots of message, i think something is wrong,,

does somebody have same experience like me ?

0 Likes
1 Solution
MotooTanaka
Esteemed Contributor

Hi,

That is my favorite configuration!

I've uploaded some sample projects of mine,

could you down load and take a look at them? 😉

https://community.cypress.com/thread/42060

https://community.cypress.com/thread/42500

https://community.cypress.com/thread/37142

https://community.cypress.com/thread/35411

moto

P.S. BTW, I recommend you to use "\r\n" instead of "\r\t"

View solution in original post

0 Likes
2 Replies
MotooTanaka
Esteemed Contributor

Hi,

That is my favorite configuration!

I've uploaded some sample projects of mine,

could you down load and take a look at them? 😉

https://community.cypress.com/thread/42060

https://community.cypress.com/thread/42500

https://community.cypress.com/thread/37142

https://community.cypress.com/thread/35411

moto

P.S. BTW, I recommend you to use "\r\n" instead of "\r\t"

View solution in original post

0 Likes
bojec_3707286
New Contributor

oh friends, Thank you again for tour reply

i solve my problem , that i didn't write UART_Init ();

Thank you very much again

0 Likes