These are chat archives for esp8266/Arduino

23rd
Aug 2015
Shelby Merrick
@forkineye
Aug 23 2015 00:39
Any tips on doing interrupt driven serial transmission in the Arduino ESP8266 world? I saw in the reference about a larger interrupt driven buffer for Serial, but am unsure how to use it. I looked in HardwareSerial.cpp and didn't see the ringbuffer. Am I looking in right spot or do I just need to use the ESP8266 API for this?
I'm referring to this - "Apart from hardware FIFO (128 bytes for TX and RX) HardwareSerial has additional 256-byte TX and RX buffers. Both transmit and receive is interrupt-driven. Write and read functions only block the sketch execution when the respective FIFO/buffers are full/empty."
I need to provide my own buffer or modify the existing one. Figured it would be HardwareSerial.ccp, but I'm not really that familiar with the Arduino specific stuff.
Shelby Merrick
@forkineye
Aug 23 2015 00:52
Cancel that.. obviously fail at reading!
Shelby Merrick
@forkineye
Aug 23 2015 01:48
well, have it working but i'm getting breaks in my FIFO. for instance, if I try to send 4 bytes, it will sometimes skip a frame window. the data gets transmitted, just not immediately following the previous frame
for instance, 4x 6N1 frames inverted, attempting ws2811 via UART:
it'll work since the dead space is less than the reset, but would like to pack it in if possible
Shelby Merrick
@forkineye
Aug 23 2015 09:57
setting the CPU to 160MHz seems to fix it. running the UART at 3.2mbps 6N1, am able to do ws2811 now without disabling interrupts
Shelby Merrick
@forkineye
Aug 23 2015 15:04
sample code in my testing branch here if anyone's interested - https://github.com/forkineye/ESPixelStick/tree/ws2811_uart