DMX
hjansen
Posts: 2
I would like to implement DMX ( RS-485) via propeller. Any hints what i will need and how to implement it ?
Tanks !
Tanks !
Comments
Depending on what you want to do, it should be relatively easy. I used to bit bang DMX on a PIC, and that was a much slower processor than a single
Propeller COG.
Could you provide some sample code that helps me understanding ?
I want to build a small Light Controller with 12 channels that i can fade in/out tap some lights ...
So i want to control a Dimmerpack via DMX ...
Maybe much much later in version 5 i will want to add some more channels and maybe support for some more lights maybe also some intelligent lights. But this is far in the future and i would want to start with something more simple at the beginning
http://forums.parallax.com/forums/default.aspx?f=25&m=152364&g=152445#m152445
(Should be some useful stuff in that thread if you want to do a transmitter)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Don't visit my new website...
Here's a DMX object
http://forums.parallax.com/forums/default.aspx?f=25&m=132052
It's done by Timothy D. Swieter, it is so simple, and it works fine !!
The driver also has a little schematic to use it directly with a SN75176 RS485 driver/reciever.
Good luck.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Regards.
Alberto.
Bit-banged from a Cog, it should be remarkably easy to generate the necessary signals for either USITT spec. Ideally, provide a flag to the Cog to indicate whether 4uS or 8uS+ Mark after break bit should be used.
Instead of having the Cog simply churn an array of up to 512 bytes of channel data out, you can have three arrays; channel level required and a cross-fade time and the third maintained by the Cog to indicate what level was last put out. It should be possible to have a single Cog not just output the channels but also handle smooth cross-fades between scenes. That could take a lot of load of your main controller.
You can go further and add lamp pre-heat and lamp 'law' ( S-Law, linear, switched etc ) arrays as well, and let the Cog deal with them. If one Cog doesn't have the necessary' oomph', multiple Cogs could be used.
You may also want to add a flag which indicates when the DMX transmitting Cog should run to avoid 'aliasing'. That's where the Cog continuously repeats the output and can result in an output stream with some channels having changed but others haven't. That may not be a problem in your particular application.
If you want to deal with lamp levels of 0..100% in your array of channel outputs instead of 0..$FF, that should be easy enough to handle as well.
The Propeller Chip is probably one of the best processors suited to DMX output.
I hope to get stuck into it in the morning, if I'm not interrupted by too many people tomorrow I should have at least a few cogs' worth of code to post.
TTFN,
Robert.
BTW,
Hippy:
Are you the same Hippy from the OpenDMX widget mailing list a few years back?
Edit: insert missing word - hey it was 1am!
Post Edited (Ziggy252) : 9/28/2007 12:06:44 AM GMT
I used Timothys code when I built a DMX receiver. If you are planning on using it there are a few issuses you should know about. I had a conversation with Timothy a few months back, part of which dealt with these issues. Take a look here.
If you fancy a challenge, you could always have a go at implementing the Artnet protocol. An Xport should work well as an ethernet interface, and there should be some Prop code from the Y-box website to get you going.
I second the comments that the Propeller is a great microcontroller for DMX reception or transmission.· A single Cog has no problem handling all 512 channels with an ASM driver.· I wouldn't stop there, the Propeller is great in so many applications.
Sorry hjansen·that I don't have any specific advice on creating a driver for transmission. The schematic is simple for the electrical portion.· From there I would say a cog needs to have a buffer of bytes for the 512 values.· A seperate Cog (or more) can then write into the buffer for performing the cross fades or other effects.
I like you idea big_mark of doing artnet.· I looked into that a while ago (about the same time we had the conversation about LEDs in my living room) but got distracted with higher priority work.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Timothy D. Swieter
tdswieter.com
One little spark of imagination is all it takes for an idea to explode
Post Edited (Timothy D. Swieter) : 9/28/2007 2:32:26 PM GMT
Here, here!!
To check out the DMX-over-ACN spec go here: http://www.etcconnect.com/news.asp?id=20065