UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
4,241 Views
Registered: ‎12-06-2007

UART Problem: Can Send , But Can not Receive

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? I tried to debug , but there is no value assign to t . If the coding is wrong, should I use array.

 

 

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

 

This is the UCF , which automatically generated by using XPS 9.2 

 

Net sys_clk_pin LOC=AE14;
Net sys_clk_pin IOSTANDARD = LVCMOS33;
Net sys_rst_pin LOC=D6;
Net sys_rst_pin PULLUP;
 

## System level constraints
Net sys_clk_pin TNM_NET = sys_clk_pin;
TIMESPEC TS_sys_clk_pin = PERIOD sys_clk_pin 10000 ps;
Net sys_rst_pin TIG;

## IO Devices constraints

#### Module RS232_Uart constraints

Net fpga_0_RS232_Uart_RX_pin LOC=W2;
Net fpga_0_RS232_Uart_RX_pin IOSTANDARD = LVCMOS33;
Net fpga_0_RS232_Uart_TX_pin LOC=W1;
Net fpga_0_RS232_Uart_TX_pin IOSTANDARD = LVCMOS33;

0 Kudos
2 Replies
Explorer
Explorer
4,230 Views
Registered: ‎08-14-2007

Re: UART Problem: Can Send , But Can not Receive

 Ok, Rule #1 with forums:

 

Do NOT re-post the same thing over-and-over-and-over again. It will not get people's attention. It will get their UN-attention. They will skip over it and never answer any of your questions in the future.

 

I'll reply to the 'original' post of yours to which  I first replied.

 

 

 

Mod's: can we get a lock/delete?

Xilinx Employee
Xilinx Employee
4,182 Views
Registered: ‎08-13-2007

Re: UART Problem: Can Send , But Can not Receive

Excellent advice...

 

Another bad idea would be have a friend create an account and post the exact same questions again. Though I can't find these now, so maybe you realized this was a bad idea and had them deleted.

 

bt