Prosessing input on a pic

Thread Starter

solexious

Joined Nov 20, 2007
55
Hello,

I'm making my first steps to writing code to process input coming from a differential bus transceiver. I have the standard that shows max/min times of the pin being high low for what out put *if you are interested it is a dmx signal* but I'm confused as how to work out say, the input goes 10101 but due to timing it is actualy 1000101 as it was low for 3 lengths. I can think of ways to do this If the standard was, each bite is 3us long, but it is between Xus and Yus for this code and Xus and Yus for this folowing code, making a full packet short or long. Also a clock line would ebe great, but all I get s the one data line.


Sorry if that was rambling or there is posts about this but im not to sure what to search fr as I dont know the name of the method used to decode this input.

Thank you in advance of any help avalible.

Sol
 

beenthere

Joined Apr 20, 2004
15,819
Asynchronous inputs are very hard to handle. If you cannot reference to a clock signal, there is no way to be sure if your input sampling in any way resembles the data rate. Is this some kind of challenge?

The old 5 1/4 disk drives has some similar problems. The solution was to place unambiguous bit sequences to clue the logic as to where the data started, and to encode the data so as to eliminate strings of 1's or 0's that would have been unreadable.

The other way to approach this is to reformat the bus data so you can use something like a hamming code to recover ambiguous bytes. Sounds like a lot of work for a poor old PIC.
 

Thread Starter

solexious

Joined Nov 20, 2007
55
mrmval: Yes I am using a dbt on my end, it decodes the signal into low/high for me then passes it to the pic.

benthere: there is a start bit at the start of the packet where it goes high for the longest period of time in the packet so I can get it to look for that so it knows its at the start of a packet?

Its and old system but its what is used as the control system in all uk theatres and a lot of the us.

A challenge it may be but looking at the hardware that runs things connected t dmx use pics so its not out of reach.

Will see if I can find digital version of the spec to link to as I only have a paid for paper version of the dmx512 standard.

Any more info that would be helpful?

Sol
 
Top