View Single Post
Old December 10th, 2013   #12
ericthegeek
Task Group Member
 
Join Date: Aug 2008
Posts: 375
Default

Quote:
Originally Posted by dtewksbury View Post
I have always wanted to design fixtures that would automatically invert the data line if necessary. I guess it was done this way originally because of hardware and processor limitations on simple implementations.
Auto-inverting has been tried before, and it never works out well. The problem is I can build a waveform that forms perfectly valid DMX both normally and inverted. Also, attempts to do auto-inversion by looking for framing errors or odd length packets invariably end up getting triggered when the user hot-plugs a cable.

Quote:
Originally Posted by dtewksbury View Post
I need it to not be MCU intensive to do the comparisons, although I have found that 40MIPS is actually quite good at 25ns per instruction.
Are you referring to the comparisons to determine if your fixture's UID is within the upper and lower bound given in the "Discover Unique Branch" request? I don't know the PIC24's instruction set, but on a PIC18 family part the comparison takes 28 instructions, two of which are dual-cycle instructions for a total of 30 instruction cycles when written in assembly (That's total for both the upper and lower bound, with each taking 15 instruction cycles).

Even with C code it should take very little time. If your compiler doesn't natively support 64-bit data types (to hold the 48-bit UID), you can do it as a series of 16 or 32-bit comparisons. A few microseconds ought to be more than enough.
ericthegeek is offline   Reply With Quote