3 Replies Latest reply on Apr 6, 2016 11:02 PM by JobinT_31

    psoc 4 uart serial read write

      How to serial print string via bluetooth device, there is only uart putchar option.




      I am transmitting a word to bluetooth device via uart.


      Synchronously I would like to receive a continuous string[size n]  from the bluetooth device without any break from transmission data. 




      For eg. I transmit "hello" from psoc over uart


      and would like to receive any string eg. "Apple"


      what i get : helloAhellophellophellolhelloe..

        • 1. Re: psoc 4 uart serial read write
                  Please send you project code so we can determine what is wrong with your code.   
          • 2. Re: psoc 4 uart serial read write

            simple uart tranmit receive using psco 4 protype kit, trogh pins 7.0 for  rx and 7.1 for tx. I receive data "HELLO" in my bluetooth device(HC05) terminal however receive data not showing up on serial window connected to com port of psoc.


            #include <project.h>
            #include "string.h"
            int main()
                CyGlobalIntEnable; /* Enable global interrupts. */
                char8 rxData;
                //int i;
                /* Place your initialization/startup code here (e.g. MyInst_Start()) */




                rxData = UART_UartGetChar();
               if (rxData){
                    /* Place your application code here. */


            /* [] END OF FILE */

            • 3. Re: psoc 4 uart serial read write

              It seems like you are sending the HELLO in a for loop.


              You are only waiting to get a single char, not the complete string.


              Either you can have a counter to wait until all the char is received or to check for a special character as end of string.




              JOBIN GT

              1 of 1 people found this helpful