10 Replies Latest reply on Dec 14, 2015 10:24 PM by habiballa.rajbar

    RX_interrupt ISR problem

    habiballa.rajbar

      Hi

         

       

         

      I want to read 8byte string using UART module and have written the rx interrupt rotine for same as below but not getting the result

         

      #pragma interrupt_handler RX_interrupt

         

      void RX_interrupt (void)
      {
          char i,j;    
          for (i=0;i<=7;i++)
          {
            j= UART_cGetChar();
              //UART_PutChar(j);
              rx_buff[i]=j;
              if (i==7)
              {
               rx_buff[7]='\0';
               rx_flg=1;
              }
              
          }
          UART_CmdReset();
      }

         

       

         

      mean while i checked putting  below code in main's while loop i am getting the result ,but i want it interrupt based

         

        j= UART_cGetChar();
             UART_PutChar(j);

         

       

         

      please suggets me ,where i am getting wrong

         

       

         

      regards

         

      Habib