Description
The Direct Digital Synthesis (DDS) module generates a continuous sine or triangle waveform, whose frequency and amplitude can be rapidly updated by either the Bpod state machine or by a separate input module. Waveform parameters can be streamed to the module to shape its output at 10kHz. The module can provide input to an amplified speaker, to generate a rapidly variable auditory stimulus. Example firmware and MATLAB software is provided for a closed loop behavior use case, where an Arduino M0 + Bpod shield reads an analog signal at 10kHz and streams its value to the DDS module. A configurable mapping function on the DDS module converts the analog signal to an output frequency. In this streaming-input configuration, the DDS module can generate behavior events to indicate when its frequency and amplitude parameters cross thresholds or meet other conditions.