user-1: I'm looking to toggle a pin on and off in a fast and timing-sensitive manner, and I'm wondering if the Arduino Uno has any built in "buffers" that would be able to hold a set of values and send them sequentially to the output pin at high speed, separately from the rest of the loop. I could then refill the buffer with the next set to be outputted, and so on.
Is this even possible? If anyone has any documentation on what's involved, I'd really appreciate some links (or tips!) :) thanks

user4143: The closest thing to what you describe is DMA (Direct Memory Access). The Arduino doesn't have DMA. More powerful microcontrollers often do, but not little 8 bit ones.
The closest you could do is to use a timer interrupt to run a small function periodically which reads the next value from an array and sets the pin to that state.
The TimerOne or TimerThree libraries can be of help to you here.

user3917: For most Arduino devices, using the USART in SPI mode is about the most effective way to generate a hardware-timed stream of bits out of one pin.  For background, see §21, “USART in SPI Mode”, in the ATmega328 data sheet.  For some example code and exposition, see ATmega Arduino USART in SPI Master Mode MSPIM,
Posted on February 17, 2015 by feilipu.
Ordinary SPI output on most Arduinos is single-buffered, hence subject to occasional delay if other interrupts get in the way of the SPIF-SPIE-SPDR interrupt handler.  However, the USART-in-SPI-mode method double-buffers output as well as input, allowing continuous data output.  That is, one can generate a continuous stream of bits clocked out at whatever rate one selects.
The Arduino Due is based on the Atmel SAM3X8E ARM Cortex-M3 CPU, a 32-bit ARM core microcontroller.  It supports DMA (direct memory access) and one can find webpages, eg arduino.cc topic 219291, describing waveform generation using DMA and the 12-bit DAC (digital to analog converter) on the Due.  More notably, the Arduino software compatible Teensy 3 series uses Cortex-M4 and M4F chips on boards running at 48, 72, 120, and 180 MHz, probably more suitable for elaborate waveform generation than are the Due or Zero.

-1: <p>I'm looking to toggle a pin on and off in a fast and timing-sensitive manner, and I'm wondering if the Arduino Uno has any built in "buffers" that would be able to hold a set of values and send them sequentially to the output pin at high speed, separately from the rest of the loop. I could then refill the buffer with the next set to be outputted, and so on.
Is this even possible? If anyone has any documentation on what's involved, I'd really appreciate some links (or tips!) :) thanks</p>
 4143: <p>The closest thing to what you describe is DMA (Direct Memory Access). The Arduino doesn't have DMA. More powerful microcontrollers often do, but not little 8 bit ones.</p>

<p>The closest you could do is to use a timer interrupt to run a small function periodically which reads the next value from an array and sets the pin to that state.</p>

<p>The <a href="http://playground.arduino.cc/Code/Timer1" rel="nofollow noreferrer">TimerOne or TimerThree</a> libraries can be of help to you here.</p>
 3917: <p>For most Arduino devices, using the USART in SPI mode is about the most effective way to generate a hardware-timed stream of bits out of one pin.  For background, see §21, “USART in SPI Mode”, in the ATmega328 data sheet.  For some example code and exposition, see <a href="https://feilipu.me/2015/02/17/avr-atmega-usart-spi-mspim/" rel="nofollow noreferrer">ATmega Arduino USART in SPI Master Mode MSPIM,
Posted on February 17, 2015 by feilipu</a>.</p>

<p>Ordinary SPI output on most Arduinos is single-buffered, hence subject to occasional delay if other interrupts get in the way of the SPIF-SPIE-SPDR interrupt handler.  However, the USART-in-SPI-mode method double-buffers output as well as input, allowing continuous data output.  That is, one can generate a continuous stream of bits clocked out at whatever rate one selects.</p>

<p>The <a href="https://www.arduino.cc/en/Main/arduinoBoardDue" rel="nofollow noreferrer">Arduino Due</a> is based on the Atmel SAM3X8E ARM Cortex-M3 CPU, a 32-bit ARM core microcontroller.  It supports DMA (direct memory access) and one can find webpages, eg <a href="http://forum.arduino.cc/index.php?topic=219291.0" rel="nofollow noreferrer">arduino.cc topic 219291</a>, describing waveform generation using DMA and the 12-bit DAC (digital to analog converter) on the Due.  More notably, the Arduino software compatible <a href="https://www.pjrc.com/teensy/" rel="nofollow noreferrer">Teensy 3</a> series uses Cortex-M4 and M4F chips on boards running at 48, 72, 120, and 180 MHz, probably more suitable for elaborate waveform generation than are the Due or Zero.</p>
