Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga

Hi,

 

    I'm working in sbRIO,FPGA based application development. Currently in working with the sample source code for using FPGA with digital FPGA I/O lines for RS 232 communication.I've developed and deployed the program and conected a MAX 232 level shifter to the DIO lines,which is my Tx and Rx. Now when i tested my program without any input by simply loop backing the I/O lines, junk values are coming in the read buffer. I tried to generate noise voltage by conecting my finger to the DIO lines, but there was no problem. Only when Tx and Rx looped, the read buffer is loaded with junk values.

 

    Second when i tried writing to the port and the MAX 232 is interfaced to a  PC, in the PC's hyperterminal only once in a while it's detecting some bytes. Please help me to solve this problem.

0 Kudos
Message 1 of 3
(3,339 Views)

Here is where I would start: 

 

Does RS-232 data flow properly from the PC to the FPGA? 

 

Are your communication parameters set properly (baud rate, stop bits, parity)?  

 

Are your enable lines steady?  If you are enabling and disabling the channels make sure you are not violating any timing parameters.  

 

Are your capacitors soldered properly on the MAX232 voltage doubler pins?  

 

 

You might need an oscilloscope and probe to debug this.  

 

Good luck, 

 

John D

0 Kudos
Message 2 of 3
(3,324 Views)

Dear John ,

Thank you for the reply. Please find my replies below:

1.Does RS-232 data flow properly from the PC to the FPGA? 

 When connected sbRIO,FPGA I/O lines through MAX 232 to the PC, and i tried to send data through the hyperteminal, only noise voltages are recorded in the read buffer. And I used a serial port monitoring program in the PC, which showed some data coming from sbRIO once in a while.

2. Are your communication parameters set properly (baud rate, stop bits, parity)?  

For both PC and sbRIO,I've set the parameters same.

3.Are your enable lines steady?  If you are enabling and disabling the channels make sure you are not violating any timing parameters.

I've selected two I/O pins, PORT8/DIO0 & DIOCTL. And these lines are permanently enabling while the execution of the program.

4.Are your capacitors soldered properly on the MAX232 voltage doubler pins?

I think I've soldered it properly. Anyway i'll recheck it.

         I'll connect CRO and the sbRIO pins and check it again as you've suggested. Moreover, if u want i can send you my program source code.

Waiting for your sugession..

Thank You

 

 

0 Kudos
Message 3 of 3
(3,313 Views)