cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1 MCU

New Contributor II

Hello there,

I am using a scale that communicate with uart rs232, i need to translate the measure wight into voltage.

my plan is first to get the information into psoc 5lp using UART (for checking i am transferring the incoming data via usbuart to the computer).

I got a double side rs232 male cable that connect to the psoc D9 port

  • after that i connect it i cannot see the information (using scope) at the rx and tx pins.
  • is the D9 (red circle )connection pass the information into rx and tx pins (yellow circle)?
  • i got an active COM channel in TeraTerm when i am connecting to the communication usb.

97ff71b5-4048-442c-8b54-934e0dee9526.jpg

  • also maybe the problem  is with my code, so i am attaching it as well.

#include "project.h"

#include "stdio.h"

#define USBFS_DEVICE    (0u)

int main()

{

    CyGlobalIntEnable

     LCD_Start();

    USBUART_Start(USBFS_DEVICE, USBUART_5V_OPERATION);

    UART_Start();

 

    uint8 ch;

    LCD_Position(0u, 0u);

    LCD_PrintString("WIGHT:");

    for(;;)

    {

        /*Check the UART status */

        ch = UART_GetChar();

        /* If byte received */

        if(ch > 0u)

       {   

        USBUART_PutChar(ch);

        LCD_Position(1u, 0u);

        LCD_PutChar(ch);

        CyDelay(30);

        }                                                                                                                         

    }

}

Capture.PNGCapture.PNG

Thank you very much

Best Regards

Michael

0 Likes
Reply
1 Solution
Valued Contributor II

Have you connected RX and TX  to your project?

For example, like here

View solution in original post

4 Replies
Valued Contributor II

Have you connected RX and TX  to your project?

For example, like here

View solution in original post

New Contributor II

Hello Evgeniy thank you for the reply.

I connected the rx and tx pins to my project (P12[7] P12[6]) using jumper wires as shown in the picture below.

please correct me if i do it wrong.

fe9ef592-6fff-48a5-bc6b-1060940320ea.jpg

Best regards

Michael

0 Likes
Reply
Valued Contributor II

Yes, it's right.

0 Likes
Reply
New Contributor II

well, so maybe the problem is with the cable.

i will check it

thank you

0 Likes
Reply