mathertel / DMXSerial

An Arduino library for sending and receiving DMX packets.
BSD 3-Clause "New" or "Revised" License
320 stars 76 forks source link

addresses above 16 #50

Closed 242bpm closed 3 years ago

242bpm commented 3 years ago

Hello!

Addressing channels 1-16 works like a charm for me! Addresses above don't (always on, always off, other strange behaviors).

I can reproduce this with all rgb led controllers i have from various manufacturers.

I'm using a Controllino Mega with a built in RS485 interface on Serial3.

I have patched the DMXSerial_avr.h with a definition for using Serial3:

#define UCSRnA UCSR3A
#define RXCn RXC3
#define TXCn TXC3
#define UCSRnB UCSR3B
#define RXCIEn RXCIE3
#define TXCIEn TXCIE3
#define UDRIEn UDRIE3
#define RXENn RXEN3
#define TXENn TXEN3
#define UCSRnC UCSR3C
#define USBSn USBS3
#define UCSZn0 UCSZ30
#define UPMn0 UPM30
#define UBRRnH UBRR3H
#define UBRRnL UBRR3L
#define UDRn UDR3
#define UDREn UDRE3
#define FEn FE3
#define USARTn_RX_vect USART3_RX_vect
#define USARTn_TX_vect USART3_TX_vect
#define USARTn_UDRE_vect USART3_UDRE_vect

Max channels is set to 64. DMXSerial.maxChannel(64);

Any ideas, where i could have a look???

mathertel commented 3 years ago

I just doublechecked: