DMXSerial ported to Teensy?

Status
Not open for further replies.

naxxfish

Member
At the moment, I'm working on a project that requires sending some DMX signals. Seeing as the Teensy3v1 has lots of UARTs, I'm rather hoping I can use one of them to do this! However, it appears the DmxSimple library is software based (boo!), as such doesn't free up my micro to do other things whilst the data is on the way.

I'm about to embark on porting DmxSerial to work on the Teensy3v1 - ( https://github.com/naxxfish/DMXSerial ) but thought I should really investigate whether this has been done already. It doesn't look too tricky to achieve - with the datasheet I should be able to do what I need to do - but why bother if it's already been done? :)

Also I noticed, rather excitingly in the datasheet, the UARTs have "RS-485 support" - although the only mention of it I can see is that you can use the RTS signal to do the transmitter enable pin. Is there anything more interesting than that?
 
Wow!
This would be too awesome if you would do this!

I'd love to use this library in a project I have in mind which is requires to receive 2 DMX universes and send one (intelligent DMX merger). But the Arduino Mega is too big and the Arduino UNO only has one USART and I don't want to do any SoftDMX, because all the calculations would use enough CPU time.

So, please, please go ahead! :)
 
I have often considered porting Ward's DMX receive code to DmxSerial.

If you just want to get DMX receive working, start with this:

https://forum.pjrc.com/threads/1966...re-functionality?p=24993&viewfull=1#post24993

Teensyduino does have RS-485 half duplex support built into Serial1, Serial2 and Serail3. Use the transmitterEnable(pin) function, as documented here:

http://www.pjrc.com/teensy/td_uart.html

However, DMX is a unidirectional protocol. Normally you'd wire the hardware to always transmit for an output port and always receive for an input port. But if you use a protocol like Modbus, it's very handy.
 
Hello All,

What an excellent thread to come across. I to have also been playing with DMX on the Teensy 3.1 and have had success using DMX Receiver library.

I should mention, that is success both sending and receiving DMX (using Dmx Receiver and DMX Simple together).

I am now looking into trying out RDM, and have had absolutely no luck getting Chris Staites library to work (For Send or Receive).
Has anybody else had it working? Or does anyone know if there is a working piece of example code. (I have also PM'd Chris directly, so if he responds, I can share on here also).

Lee
 
Last edited:
Status
Not open for further replies.
Back
Top