Quantcast
Channel: Digital I/O topics
Viewing all articles
Browse latest Browse all 2177

Decode Manchester encoded Signal with PCIe-6321

$
0
0

Hello, I'm really new to this, but I'm doing an internship where we are using the PCIe-6321 port0/line0 to receive a digital 200kBit PCM signal with visual studio and c#. 

The signal is Manchester encoded and has a certain pattern of bits at fixed intervals that I'm supposed to detect. The pattern is 32 bits long, followed by 255 other data words of 32 bits length.

What I've tried so far:
- Make a sample clock set to 200kHz to read samples on rising edges, use the readMultiPortByte(-1) function to read all the data in the buffer into an array and then look at the transitions between the array[i] and array[i+1] to decode back into usable data (This doesn't work, since I'm not actually detecting the rising/falling edges of the signal, but whatever value the signal has when the clock has the edge)
Weirdly enough, if I don't do the 'decoding' step I can actually find the pattern, but the intervals it appears at is irregular and the data isn't where it's supposed to be.

-Then I've looked into using the changeDetection Timing in a similar setup, to detect both rising and falling edges of the signal on line0 of port 0, but that only gives me a bit array of alternating 0's and 1's. I'm probably doing something wrong here.

- I've tried using NI MAX task to see what the waveform looks like in there, but that hasn't really helped much.

Due to security reasons the pc with the card isn't connected to the internet so sadly I can't attach any of my code, I'd still appreciate any kind of input on things to try or where I've made mistakes.
Hope this was readable since english isn't my first language, have a nice day.





Viewing all articles
Browse latest Browse all 2177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>