0

I currently am working with the DMXSerial library written for arduino. This library can be used, depending on how it is initialised as a transmitter, or as a sender.

The transmitter should be initialised as followed: DMXSerial.init(DMXController);

Whereas the initialisation for a receiver is as followed: DMXSerial.init(DMXReceiver);

I now want to create an implementation that receives and controls. Does anybody have an idea how to do this without missing certain important interrupts or timing constraints?

Alex van Rijs
  • 803
  • 5
  • 17
  • 39

1 Answers1

0

That library doesn't look like it will easily do bidirectional. But, since DMX512 is a simple serial protocol, there's nothing stopping you from writing your own routines that manipulate the UART directly. The library will be a great guide for this.

Now, having said that: what kind of situation do you have where you want a device to both control and receive? The DMX512 protocol is explicitly unidirectional, and at the physical layer it's a daisy-chain network, which prevents multiple masters on the bus (and inherently creates a unidirectional bus). If you are a slave and you are manipulating the bus, you risk clobbering incoming packets from the master. If you are clever about it, and queue the incoming packets, you could then perhaps safely retransmit both the incoming data and your own data, but be aware that this is a decidedly nonstandard (and almost certainly standards-violating) behavior.

uint128_t
  • 335
  • 2
  • 10