Hi, I have a problem, I have tried to make a comunication of my PSoC 5LP whit LABView through UART, but in my code i cant read more than one character.

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

cross mob
user_3977411
Level 1
Level 1

#include "project.h"

#include <string.h>

char datorecibido;

CY_ISR(InterrupRX)

{

    datorecibido=UART_1_GetChar();

   

}

int main(void)

{

    CyGlobalIntEnable; /* Enable global interrupts. */

  UART_1_Start();

isrRX_StartEx(InterrupRX);

     for(;;)

        {

           if (datorecibido=='1')

                {

                    LED_Write(1);

                    UART_1_PutString("LED encendido \n");

                    CyDelay(500);

                   

                  

                }

             if (datorecibido=='0')

                {

                    LED_Write(0);

                    UART_1_PutString("LED apagado \n");

                    CyDelay(500);

                   

                }

        }

}

0 Likes
1 Solution
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

ernesto-69,

use example below as example of receiving command string with value from terminal into circular buffer

UART string reception garbage value

/odissey1

View solution in original post

0 Likes
1 Reply
odissey1
Level 9
Level 9
First comment on KBA 1000 replies posted 750 replies posted

ernesto-69,

use example below as example of receiving command string with value from terminal into circular buffer

UART string reception garbage value

/odissey1

0 Likes