Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiCo_4221156
Level 2
Level 2
5 likes given First like received First like given

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
1 Solution
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Have you connected RX and TX  to your project?

For example, like here

View solution in original post

4 Replies
EvPa_264126
Level 7
Level 7
500 replies posted 250 replies posted 100 likes received

Have you connected RX and TX  to your project?

For example, like here

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

Yes, it's right.

0 Likes

well, so maybe the problem is with the cable.

i will check it

thank you

0 Likes