キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

How to decode uart Tx (Rx) analog waveform?

解決済み
解決策を見る

I have PCIe-6321 NI card, I am measuring uart Tx (Rx) pin with maximum sampling rate 250KHz getting analog waveform.

How I can decode this waveform into characters sending over uart with known baud rate and format (115200 8N1 in my specific case)?

 

For example, here is my waveform for character "1" (31Hex):

SergeS_0-1666217612410.png

 

"2" (32Hex):

SergeS_1-1666217682469.png

 

AA Hex character:

SergeS_2-1666218140222.png

 

55 Hex character:

SergeS_3-1666218225718.png

 

 

Is this even possible with 250K sampling rate? 

Anybody ever done such thing? Anybody can share VI?

0 件の賞賛
メッセージ1/6
4,177件の閲覧回数

@SergeS wrote:

Is this even possible with 250K sampling rate? 

Yes, but just barely so. I guess you are familiar with Nyquist-Shannon? You typically want to do some Oversampling.

 

Anybody ever done such thing? Anybody can share VI?


Why would you want to do that? Is this for a practical application, troubleshooting, homework, or curiosity?

0 件の賞賛
メッセージ2/6
4,140件の閲覧回数

It is for practical application, I would like to test uart communication between some devices so I have captured waveform on Rx-Tx lines.

I have setup some limits for voltage and timing, but it would be beneficiary for me to decode data and to compare with known data I am sending over.

 

Yes, I am familiar with Nyquist-Shannon criteria, according to it I am on the edge, in "gray" zone,  that is why I am asking is this even possible...

Anybody can share?

 

0 件の賞賛
メッセージ3/6
4,108件の閲覧回数

@SergeS wrote:

It is for practical application, I would like to test uart communication between some devices

 


In that case, I recommend using a logic analyzer or RS-232 sniffer. There are also oscilloscopes that can automatically decode the bytes for you. Even hooking up an RS-232-USB-adapter or an Arduino might do the trick. This will probably be more robust (and cheaper) than reverse-bit-banging it yourself.

0 件の賞賛
メッセージ4/6
4,091件の閲覧回数
解決策
受理者 SergeS

I would rather get a USB-FTDI adapter and use the FTDI libraries for robustness - saves you a lot of engineering time and effort.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution
0 件の賞賛
メッセージ5/6
4,074件の閲覧回数

Ok, thanks to all answered.

I have already FTDI USB adapter, I just would think somebody will offer already existing VI 🙂

0 件の賞賛
メッセージ6/6
4,013件の閲覧回数