cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
moraali
Explorer
Explorer
2,709 Views
Registered: ‎12-06-2007

Please Help:- Can Send Data To Hyperterminal, But Can Not Receive Data From Hyperterminal.

Based on the coding below , I can not receive anything from the hyperterminal. How can I rectify the problem , so that I can receive data from the hyperterminal and display it back to the hyperterminal

 

 

#include "xparameters.h"
#include "xuartlite.h"


#define UART_BASEADDR XPAR_UARTLITE_0_BASEADDR
#define ESCAPE 0x1b


static void myprintf (char *s)
{
  char t;
 
  while (*s)
  {
   XUartLite_SendByte (UART_BASEADDR ,*s ); // Able to send to Hyperterminal
   s++;
  }
 
  
 do
 {
   /*Problem is here. It should receive data from hyperterminal and display it back.
   But it does not work.How should I rectify it? */
     t = XUartLite_RecvByte(UART_BASEADDR); //Receive
     XUartLite_SendByte (UART_BASEADDR , t ); //Send
    
 } while (t != ESCAPE);
 
}


int main()
{
 myprintf("Good morning");
 
 
 return 0;
}

 

0 Kudos
0 Replies