1 Reply Latest reply on Jan 9, 2019 12:24 PM by BoTa_264741

    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.

    user_3977411

      #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);

                         

                      }

              }

       

       

      }