Quantcast
Channel: User Jeremy - Stack Overflow
Viewing all articles
Browse latest Browse all 46

Answer by Jeremy for How to use Raspberry Pi Pico with DAC with SPI to generate sine wave of 1 kHz with 20 k samples per cycle

$
0
0

Aside from any other issues, the SPI hardware implementation in the RP2040 only provides automatic control of CSn for transfers of up to 16 bits.

For your case, implementing a simple, 24-bit fixed-format, output-only SPI in the PIO subsystem is quite straightforward, and has the advantage of only requiring a single DMA channel for fully-DMA operation (compared to at least 2 chained DMA channels for a fully-DMA SPI/GPIO approach). The example in the RP2040 datasheet already provides most of the implementation.


Viewing all articles
Browse latest Browse all 46

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>