LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Decoding an analog multiplexed signal

Hi,

I am trying to decode an analog multiplexed signal where the clock, strobe
and data have to be derived from the analog input signal. If someone can
point me in the right direction I would appreciate it emensly.

The signal goes from 0 to 28 vdc (using a DAQ interface). I don't remember
the frequency of the input signal but for argument sake, say it is 1ms per
bit with 32 bits of data with a 32 bit off time between "words".

It is used to decode a controller for audio where there are several pots
and I need to decode the signal and break each bit up to display an image
and amplitude of each.

Any help in this matter will be gratfully appreciated... trust me, I have
found a number of ways it will not work, just can't fi
nd a way it will work

ken5901@go.com

ken
0 Kudos
Message 1 of 3
(2,314 Views)
Hi Ken,

Seeing as your question is general and and you don't have any extreme demands (like you have to do this on the fly or react in any specific time), I may be able to give you some ideas on how to start.

First I will assume that you have you have at least one "packet" where the data is somewhere in the waveform data. I will also assume that the incoming data is over-sampled by at least a factor of 2 (more is better).

You will first want to determine the clock frequency and establish its phase. With the info that you have specified, I will proceed with this discussion by taking the approach that the time period durring which all zero's are being transmmited can be used to establish the clock frequency. To do this you must scan through the data, comparing each value with thresholds to determine if it is high or low (I am alos ignoring noise). The resulting array of highs and lows should then be serached for the portion that has the longest sequence of of lows. This should corispond to the period where the zeros are being transmitted. You can then determine the length of this sequence of lows. This durration can then be divided by the 32 to determine the clock frequncy.

The Next step would involve synchronizing the clock. The easiest way to do this would be to start with the portion of the acquired data that represented the 32 zeros and located where it ended. The transition from zero to true COULD be the the satart of the bits you are trying to read. (Usually self-clcocking protocols will have a unique bit pattern that never can appear in the data transfer that can be used to syncronize the clock. You should check your protocol to determine if there is a defined pre-amble, or a start bit, etc.)

Once you know what your clock frequency is, and have an offset into the data stream that marks the begining, you JUST have to start chopping up your recieved data into groups (size based on clock freq.) of samples that represent each bit and build up an array of booleans that can subsequently be converted into the scalar values you are trying to read.

This answer is based on the limited information that you have provided and assumes that the approximate frequency of the incoming data is known, and that no noise is present on the line. It also assumes that the data can be collected and post proccessed.

Does this device you are working with have a name or is there a defined protocol that you are working with?
If it wasn't for the fact that it is running 0-28V I would have guessed that you are working with some kind of synchronous data link.

Re:find many ways it will not work.
What you are trying to do is not easy.

reply to this message if you need clarification or would like to ask follow-ups. Don't expect a quick answer though, I have to take care of my paying customers first.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(2,314 Views)
I thought this questions sounded familiar.
What's the deal, Are you trying to program a Midi interface on the wek-ends or something?

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 3
(2,314 Views)