Activity › Forums › Questions & Troubleshooting › Software & Firmware › DMX at RS485 interface
-
Hello,
i try to use the RS485 interface of the Mega to control a lamp via DMX. So far without luck.
What i tried:
DMXSerial Library
– i edited the DMXSerial_avr.h file for using UART3 (Serial 3)
added the following lines (not sure it’s correct):
Code:
#define DMX_USE_PORT3#if defined(DMX_USE_PORT3)
#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– uploaded the library example (without any warnings/errors)
Any ideas?
Thanks!
Roose
-
Found the solution myself. I had to enable the tx mode:
digitalWrite(75, HIGH);
digitalWrite(76, HIGH);
Viewing 1 - 3 of 3 replies
Log in to reply.