- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
08-13-2009 08:20 PM
Good morning
Are you there? Please help me .
Thank you.
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-09-2009 08:01 AM
Good evening sir
I need your help. Are you free?
Thank you
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-11-2009 09:34 AM
For a long time I am also not in touch with your Code/Project and also I am bit busy with my ongoing project - so it'll be not possible for me to go through your entire code and give a solution. 1st I'll suggest you to take help from some local guys like your Prof / friends - That'll help you in a better way as you'll come to know where you are doing wrong. Anyway as a backup plan, I am giving you the algo which may help you to come out from the problem -
As stated by you, your Global_RX_Buffer (Or what ever array you are using to diplay in LCD) is having different data at different runs:
1st Run - Original_Array = "1|| ||| OK"
2nd Run - Original_Array = "2" || ||| 1 || ||| OK"
3rd Run - Original_Array = "32" || ||| 1 || ||| OK"
or So On.....
What I understood you want to retrieve the value "1" from the array. To do this as suggested earlier - take a 2nd Array (Second_Array) of same length. Let N is size of the Original_Array then
char Second_Array[N]; unsigned char End_Ptr; // Considering your array length is less than 255 int i; unsigned char Your_Req_Data_ASCII = 0x00; unsigned char Your_Req_Data_LED = 0x00;
//Initialize the 2nd Array for(i=0;i<N;i++) { Second_Array[i]=0x00;} //Copy ASCII Character & Numeric Value to 2nd Array from Original Array for(i=0, End_PTR=0;i<N;i++) { if((Original_Array[i]>= '0' && Original_Array[i]>= '9') || (Original_Array[i]>= 'a' && Original_Array[i]>= 'z') || (Original_Array[i]>= 'A' && Original_Array[i]>= 'Z')) { Second_Array[End_Ptr++]=Original_Array[i]; } } for(i=End_PTR-1;i>=2;i--) { if((Second_Array[i]="K") && (Second_Array[i-1]="O")) //Checking for OK { //This is the Byte you are looking for. For your eg it should be '1' Your_Req_Data_ASCII = Second_Array[i-2]; //As this is in ASCII so for '1' you will get 0x31 and so on.
//To light up tour LED using GPIO you need to convert it to Binary Your_Req_Data_LED = Your_Req_Data_ASCII - 0x30; //You can also put a check if the data you gat is valid } }
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-11-2009 08:03 PM
Good evening,
Thank you for replying to me . I have a major problem. This FPGA's UART are function to receive only 16 bytes. If a string of data (more than 16 bytes) is sent to the FPGA, how can the UART break into pieces and display it?
Pls guide me in solving this difficult problem.
Thank you.
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-11-2009 08:27 PM
moraali wrote:Good evening,
Thank you for replying to me . I have a major problem. This FPGA's UART are function to receive only 16 bytes. If a string of data (more than 16 bytes) is sent to the FPGA, how can the UART break into pieces and display it?
Pls guide me in solving this difficult problem.
Thank you.
Pl try to use the UART in Interrupt Mode instead of Polling Mode - That will solve your issue.
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-11-2009 09:06 PM
Good evening sir,
thank you for replying to me . Sorry to disturb you. Previously sir replied
//================================================
Use Interrupt Mode instead of Polling Mode. Try out some ready examples avialable in Interrupt Mode which where it's receiving 100 Bytes at a time.
Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/
//================================================
Pls do not get furious . Besides googles , I just want to know where can I get the examples? Can you provide me the link(s) ?
Thank you
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)U f
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-11-2009 09:12 PM
Good evening sir,
About the link(s), can I read your code in this forum when you firstly tried to help me
Note: I have not configured the UART as STDIO and I am using both the UARTS in Interrupt Mode
.
.
.
I'll apreciate if any one can comment on my code. Normally it is working fine without any delay. But when I am simultaneously trying to Receive and Transmit huge data then the UART is getting hang. In that case I am taking care with delay funcion.
In the Function "XUartLite_Recv" you have to pass the parameter how many byte you want to receive. I am not happy with this as when I am not knowing how many Bytes I am going to receive then its not comfortable in Interrupt Mode. In that case I am setting the parameter to 1 Byte which increasing the overhead.
Regards,
Shantanu
Pls reply to me as soon as possible .
Thank you
Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-19-2010 09:06 AM
HELLO SIR,
I have to write the code for sending and receiving bytes of data using xilinx uartlite functions.I can able to use XUartLite_Send function and send the data to the FPGA kit and view that data using RS 232 port on Hyperterminal. But using XUartLite_Recv i am unable to Receive the bytes of data and then sending through XUartLite_Send function.So pls help me to know how to use the XuartLite_Recv function with an example











