-->
Page 1 of 1

Low level serial access for sending DMX?

PostPosted: Thu Jan 14, 2016 8:51 pm
by Solexious
I'm currently on my last step of porting my artnet library from the ti connected launchpad to the ESP8266 arduino IDE, getting DMX output working. (currently it correctly reports it's status to poll replies and controls a single LED on channel 1 universe 0)

I use this code: https://github.com/solexious/Artnetnode ... #L229-L240
on the energia IDE to correctly send out the first frame flag of the DMX packet, then switch it to the correct mode and dump out the frame of DMX into the UART buffer to be sent while the MCU is free to do other things.

Is there a way for me to have the same low level control of the UART in this arduino IDE board for the esp8266? I need to be able to set the serial speed, then control the parity and number of stop bits of the UART port chosen.

Code: Select all    ROM_UARTConfigSetExpClk(UART0_BASE, F_CPU, 125000,
                              (UART_CONFIG_PAR_NONE | UART_CONFIG_STOP_TWO |
                              UART_CONFIG_WLEN_8));


Best,

Sol

Re: Low level serial access for sending DMX?

PostPosted: Thu Jan 14, 2016 9:26 pm
by WereCatf
Would https://github.com/esp8266/Arduino/blob ... .md#serial help? There's a bit that says:
Both Serial and Serial1 objects support 5, 6, 7, 8 data bits, odd (O), even (E), and no (N) parity, and 1 or 2 stop bits. To set the desired mode, call Serial.begin(baudrate, SERIAL_8N1), Serial.begin(baudrate, SERIAL_6E2), etc.


I can't help you any further than that as I have never used serial for anything.

Re: Low level serial access for sending DMX?

PostPosted: Fri Jan 15, 2016 5:55 am
by Solexious
Thanks very much, I swear I read the docs but must have blanked over the end paragraph. Just what I need!

Cheers

Sol