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
10,595 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

  Let say I need to buy a cable (as stated above), I would like to show the cable connection. I am not sure whether it should be null modem or not. If it should , please let me know.

 

Basically

 

1) Modem Port     = No Loopback

 

2) FPGA Port       = Loopback (pin 1,4 and 6 are connected together)

 

 

So..... should I buy this type of cable?

 

   FPGA     =>       Modem

(Female)  =>        (Male)

     

      1        ==>          1

                                      

      2       ==>           3

 

      3       ==>           2

   

      4        ==>          4

 

      5       ==>           5

 

      6       ==>           6

 

      7      ==>            7

              

      8      ==>            8

 

      9      ==>            9

                                      

                                      

                                     

      You can reply to me on Monday.

 

Thank you very much. Your help is really being appreciated.

0 Kudos
Explorer
Explorer
10,580 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

    So sorry to disturb you. But my friend emailed me this . Maybe this might help us to solve this problem

 

 

Dear moraali

 

  If the first problem exists, then you will need to implement the handshaking signals in your verilog/vhdl code.

Refer to the RS232 (EIA232) standard (clickie)

 

http://www.cableeye.com/Data_Com_Basics/RS232_standard.html

 

for more information.

Yes, if the second problem exists, a null modem cable should fix it.

Your FPGA doesn't seem to be generating any handshaking signals (atleast according to the schematic, the handshaking signals are looped). Your modem will require these for calcuating the auto-baud. Implement the handshaking signals in your code, and then connect the RI, DCD, RTS and CTS lines, via your MAX232, to the modem.

Regards,
Debu

 

 

This is from the previous mail

 

The problem can lie in two places:

  1. The baud rate configuration is incorrect. Many modern modems rely on handshaking signals (RTS & CTS) to determine the auto-baud. There is a possibility that you are not generating these correctly on your FPGA.
  2. The Rx and Tx lines are not crossed. Possibly, the cable which you are using for your modem is meant for connecting the modem to your PC. And so is the D9 port on your virtex board.

    This is probably the configuration of the cable:



    PC Serial Port------------------Modem D9 Port | Modem Internals
    Rx -------------------------------Tx-----------------------\/---Rx
    Tx -------------------------------Rx-----------------------/\---Tx

    The same cable, if used with the Virtex board will cause the Rx to connect with Rx, and Tx to connect with Tx, as shown below.

    Modem D9 Port ----------------Virtex Board D9 Port
    Tx--------------------------------------Tx
    Rx--------------------------------------Rx
    Now, this won't work.

    This is the Configuration that you require:

    Modem D9 Port ----------------Virtex Board D9 Port
    Tx----------------\/--------------------Tx
    Rx----------------/\--------------------Rx

Hope this helps,

Regards,

Debu

 

 

  Please do not loose hope on me. I am really trying hard to solve this problem. Please be with me.  

 

 

Thank you.

0 Kudos
Explorer
Explorer
10,574 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

   My friend emailed me and said

 

You will need to write a module for auto-baud generation (as I stated before). Alternatively, you could use http://www.opencores.org/?do=project&who=auto_baud for the same. And, yes, you will still need a null modem cable.

Best of luck for your project!

Regards,

Debu 

 

  

 I am not from engineering background. May I know what should I do?

 

 

Thank you very much.

0 Kudos
Historian
Historian
10,567 Views
Registered: ‎02-25-2008

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)


moraali wrote:

 

 I am not from engineering background. May I know what should I do?

 



 

Find a local engineer with relevant experience to help you.

 

Seriously!

 

-a

----------------------------Yes, I do this for a living.
0 Kudos
Explorer
Explorer
10,557 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning

 

    Sorry to disturb you. I waited for you on Monday, but you did not reply. Are you still going to communicate with me? I still need your help.

 

 

Thank you

0 Kudos
Explorer
Explorer
10,546 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

For last few days I little bit busy in my personal work. Regarding Cable what drawing you have sent - it seems it should work - you dont have to buy new one. After going home I use to sit, but for last couple of days I am not getting time. I am trying to get back to you at my earliset hopefully by today night or tomorow night.

Shantanu

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
0 Kudos
Explorer
Explorer
10,545 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning ,
   Thank you for replying. So sorry to disturb you. I got some answers for the FPGA-Modem communication problem.
.....My problem is simple, but (because I am not from enginnering background) I am not sure how to rectify this problem.
This is my problem:-

1) When I connect my FPGA to the PC , I can perceive they communicate perfecly via hyperterminal.

2) When I connect my Modem to the PC, I can perceive they communicate perfecly via hyperterminal.

3) But when I connect my FPGA to the Modem , I found out they are not communicating.

I can not see what is the problem because they are connected to the PC (hyperterminal is not use).......
Then the guy replied
The problem can lie in two places:
1) The baud rate configuration is incorrect. Many modern modems rely on handshaking signals (RTS & CTS) to determine the auto-baud. There is a possibility that you are not generating these correctly on your FPGA.
 
   You will need to implement the handshaking signals in your verilog/vhdl code. You can refer to this:-
 
2) The Rx and Tx lines are not crossed. Possibly, the cable which you are using for your modem is meant for connecting the modem to your PC. And so is the D9 port on your virtex board.
This is probably the configuration of the cable:

PC Serial Port------------------Modem D9 Port | Modem Internals
Rx --------------------------------------Tx-------------------------\/---Rx
Tx --------------------------------------Rx-------------------------/\---Tx

The same cable, if used with the Virtex board will cause the Rx to connect with Rx, and Tx to connect with Tx, as shown below.

Modem D9 Port ----------------Virtex Board D9 Port
Tx-----------------------------------------------Tx
Rx-----------------------------------------------Rx
Now, this won't work.

This is the Configuration that you require:

Modem D9 Port ----------------Virtex Board D9 Port
Tx------------------------\/--------------------------Tx
Rx------------------------/\-------------------------Rx
In order to communicate with the modem, you need to use a null modem cable and have you FPGA generate the auto-baud signals.
 I am planning to buy the cable. What is your opinion ?
Thank you
Tags (1)
0 Kudos
Explorer
Explorer
10,544 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning,

 

    About the cable, I think I will abide by your advice because you are the expert. But please read the above mail throughly. May be there is something  where I left out.

   Take care.

 

Thank you very much.

0 Kudos
Explorer
Explorer
10,543 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning,

 

 This is the auto-Baud where it is written in verilog.

It is in the attachment.

 

Thank you

0 Kudos
Explorer
Explorer
10,497 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Hi,

 

I am sending one Project for your ML401 Kit, Pl find it as an attachment. I have tested the application part in different project done for Spartan3AN starter Kit (as I am not having ML401) and it seems working fine.

 

What you have to do?

1> Download the Prj file > Unzip it  and save it in your PC.

I am also sending a Text file - "Response.Txt" - Download it and save it somewhere in your PC.

2> Connect your board with the  PC using the same RS232 Cable what you were using. Open the Hyperterminal with setting 9600 8 N 1 and Flow Control None - I thing you were using the same earlier.

3> Open the Project with EDK9.2 and download the Bitstream from the tab Device Configuration.

4> Check the LCD in the board - It should display "Testing LCD" in Line1 and "Press any PB" in line2.

5> there are 5 PB switches in the board excluding the Reset PB Switch. Press any one of them - In the Hyperterminal you will get the message "Starting New" and in the next line you will get an AT Command. 

6> Also check the LCD - In the line 1 you should find the same At Command. 

7> In the Hyperterminal - Click the tab "Transfer" - > Send Text File -> and open the file Response.txt from where you have saved it.

8> check the LCD - In the line 2 you should get "OK" as in the file Response.txt there is only "OK". 

9> Change the Dip Switch Setting and press any one of the PB switch - You will get the ATE Command according to the Dip switch setting in your heperterminal.

10> Repet from step 6

 

Here I have used 3 AT commands as -

 

Dip Sw Value  ------------ AT Command

0x01-------------------------"AT+CMGF=1"

0x02-------------------------"AT+CMGS=+60179310740"

rest --------------------------"AT"

 

Using the Dip Switch ckeck out all the three AT commands.

 

If it works fine with the PC then what to do next?

 

 

1> Connect your board with the Modem using the same RS232 Cable what you were using.

2> Open the Project with EDK9.2 and comment the line 158 to 164 in the file TestApp_peripheral.C and Build ALL once again and download the Bitstream from the tab Device Configuration.


status = Send_Command_To_Modem("Starting New");
if (status != XST_SUCCESS)
Disp_Failure_Msg(); //Display Failure Message in LCD
status = Send_End_of_Text_to_RS232(XPAR_RS232_DCE_DEVICE_ID); 
if (status != XST_SUCCESS)
 Disp_Failure_Msg(); //Display Failure Message in LCD


 

 

5> there are 5 PB switches in the board excluding the Reset PB Switch.

6> Also check the LCD - In the line 1 you should find the same At Command. 

7> check the LCD - In the line 2 you should get "the response from the Modem

9> Change the Dip Switch Setting and press any one of the PB switch - You will get the ATE Command according to the Dip switch setting in your heperterminal.

10> Repet from step 6

 

Here I have used 2 AT commands as -

 

Dip Sw Value  ------------ AT Command

0x01-------------------------"AT+CMGF=1"

0x02-------------------------"AT+CMGS=+60179310740"

rest --------------------------"AT"

 

Using the Dip Switch ckeck out all the three AT commands.


 

 

 

 

Shantanu

 

 

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
0 Kudos
Explorer
Explorer
9,788 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Pl finde the file response.txt as an attachment.

Shantanu

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
0 Kudos
Explorer
Explorer
9,769 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 

 

Hi,

 

Try out that project using hyper terminal and let me know the feedback. In Serial communication in polling mode Timing is critical issue – So I suggested to use “Response.txt” using Send Text File.

 

In the UART lite the FIFO is of 16 Byte. So you can not write or read more than 16 Bytes at a time when you are using UARTlite in polling mode. I tried to take that issue in my code.

 

In my code I tried to use the LCD and PB switches because it'll help to debug the system. You can check out what data you are getting and also using Push Button you can carry out stepwise execution of the program, which will help to find out where you are getting problem. This code may not be a solution to your problem but will help you to get the solution.

 

Use the same cable as you were using as per the attached drawing you have sent – it seems OK.

 

Regarding Auto Baud Rate – Normally these modems works on a standard Baud Rate. In your case it seems 9600 as the modem is communicating with your PC @ 9600. Though you can change the Baud rate using AT commands – There must be some AT commands for that – Right now you don't need that, but for future you can check it out.

 

Now some general topic –

 

Apparently I went through your all of the threads on UART issue – I found you are fighting for last few many months on it. I really appreciate that. Keep that attitude – it'll help you in long run. I believe in a foolish proverb -

If your project starts running in first shot – Beware its going to make you cry in long run – there must be a bug which you are missing right now.

And if your project is making you cry in starting phase and you come out after a long fight – you can be confident that your project is more full proof and your learning is more accurate.


I will abide by your advice because you are the expert” No one is expert. We all are in a stage of learning. Forums are platforms where we can share our question and knowledges, as it speeds up our learning process.

in most of your thread you are quoting “I am not from engineering background.......”. No one is going to bother in the forum about your background. You will find lots of engineers from Mechanical/Chemical background working on application software. In this forum you will find lots of guys who have never heard of the name FPGA/CPLD while they were student, but now are champ in this field. The best way to learn is learning while doing a project. Try to take advantages of the net, Do goggling....lots of stuffs are available on each topic. There is no end of learning...

and you have to if you want to survive in this era..


I am confident that you will be able to make your project run.

Best wishes,

Shantanu

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
0 Kudos
Explorer
Explorer
9,760 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

 

       Thank you for replying. I really appreciate your help and your advice. After many months of trial, I felt insecure when I can not perceive the output. In addition, the pressure I obtained from my parents and lecturers, made me panicked. Thank God, I have you as my guide. I really appreciate your previous mail. I was in the verge of crying after reading your adage. After reading your advice , I feel a bit confident and proud of the effort I took to solve this problem.

 

Put Effort Not To Fail,

    But Don’t Fail To Put Effort

                                     

                                    ---My Dad---

 

 I am not feeling well today (I having headache and fever), so I took MC for today and Friday. That is the reason why I can not reply to you immediately.I am sorry about that. Saturday and Sunday the lab is closed. So I only can able to test it by next week Monday. I will test it and inform you the status before 10/June/2009.

 

In the mean time , I need your expertise in connecting FPGA to PC through Expansion Header. It is simple idea , as shown below:-

 

1. When I type a number from 1 to 4( let say I type ‘1’) via HyperTerminal, the input should go to the Expansion Header.

 

2.  Then , the FPGA should receive the input from Expansion Header and trigger the GPIO LED.

 

Basically, I want to make the FPGA Expansion Header to function as my second UART (ML401 only has ONE UART).

Is it possible?

 

In the attachment, is the diagrams of FPGA-PC connection (where the cable is connected to the PC)

 

My questions are:-

 

a) What type of cable should I use? Should I sue the PC-FPGA cable that I have shown by diagram to you previously?   

 

b) Should I create  MAX2323 as shown in 3.JPG? By looking at it, is my shouldering placement is correct? I have tested through BMM.

 

c) If you see the sheet_12.JPG, the power is stated as VCC3V3. If I connect it to 5V, will it work? Or should I connect it to 3.3V?

 

d) Based on the coding in the attachment (traffic.c ), is there any thing should I take note?

 

  I am sorry if I had annoyed or aggravated you. I am really grateful to have you as my guide.

 

Thank you.

0 Kudos
Explorer
Explorer
9,759 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

  The attachment is in here.

 

Thank you.

0 Kudos
Explorer
Explorer
9,725 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 
0 Kudos
Explorer
Explorer
9,724 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 
0 Kudos
Explorer
Explorer
9,723 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning,

 

     I had tried but it does not get any respond from the Modem.

 

......

7> check the LCD - In the line 2 you should get "the response from the Modem.

......

 

   What should I do? I had saved it in a picture form. Please check the diagrams in the attachment. Above attachment is for PC-FPGA and FPGA-modem respectively. I had tested the modem (Modem-PC) before connecting to the FPGA. It is in this attachment 

 

 If you can not see the diagrams, please let me know. I can send to you again.

 

Please reply to me as soon as possible.

 

 

Thank you.

 

PC-Modem.JPG
0 Kudos
Explorer
Explorer
9,721 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

   I just want to inform something. I do not know whether it is very important or not. Every time I insert AT command (Modem-PC), I perceived that  there is green blink on the Modem. But there is no any blinking at FPGA-Modem connection.

  What shall I do now? Please do not give up on me. I really need your help.

 

Please reply to me as soon as possible.

   

Thank you.

1b.JPG
0 Kudos
Explorer
Explorer
9,716 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Pl send ,me the images in steps when your PC is communicating with the Modem.

Also send me the User Guide or datasheet of the modem - Specific one which you are using. 

Shantanu 

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
0 Kudos
Explorer
Explorer
9,693 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 
0 Kudos
Explorer
Explorer
9,613 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 
0 Kudos
Explorer
Explorer
9,613 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good morning ,

 

   The specification is in the attachment and in the previous mail

 

 

Thank you

0 Kudos
Explorer
Explorer
9,596 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Send me the photos (In steps) while you are communicating with the Modem from PC using Hyperterminal -

Try out with two settings -

1> 115200 bps / 8 Bit / No parity / 1 Stop Bit / Flow Control - None

1> 9600 bps / 8 Bit / No parity / 1 Stop Bit / Flow Control - None

 

 

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
0 Kudos
Explorer
Explorer
9,588 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Good evening,

 

   !st attachment. 

 

Thank you

0 Kudos
Explorer
Explorer
9,587 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 
0 Kudos
Explorer
Explorer
9,586 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 
0 Kudos
Explorer
Explorer
9,585 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

 
0 Kudos
Explorer
Explorer
9,584 Views
Registered: ‎12-06-2007

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

0 Kudos
Explorer
Explorer
9,576 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

I am sending One of the Pic of hyperterminal which you have sent with remarks as an attachment.

Red Line means the response from the modem and

Blue lines means the commands which you are sending from the PC - I mean you are typing

Pl confirm - is it so?

 

Every time you connect the modem with the PC do you get some msg at the initial stage - Like in this case xx and Error, before you start sending commands. (in the Pic 11b it is T and ERROR) - Pl confirm?

 

Now one silly question I want to ask you regarding posting in the forum - How to insert Pictures?

There is one icon for Insert/Edit Picture in the top - But when ever I click it it asks for Image URL. But how to insert image from PC? In your few many post you have inserted pictures - It'll be really helpful to me if you can let me know the way.

 

As I am unable to insert the image thats why I am attaching it.

 

Shantanu

Shantanu

 

 

 

Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
0 Kudos
Explorer
Explorer
9,575 Views
Registered: ‎04-06-2009

Re: Very Difficult , Need Aid:- FPGA Not Sending Out Data (UART Problem)

Pl find the attachment
Shantanu Sarkar
http://www.linkedin.com/pub/shantanu-sarkar/0/33a/335
10b_ques.JPG
0 Kudos