Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

General • Re: Using DMA to output to a parallal bus (GPIOs)?

$
0
0
One design change I think I will make though, to hopefully help with this, is to move the address/data pins over to the lower GPIOs. That saves some shifts to move the data to the right spot when using `gpio_put_masked`. I thought about using `gpio_put_masked_n` which would work as well, though I think moving the pins isn't a big deal hopefully. I haven't put in an order for the PCB yet. Doing it that way means I'd only have to shift the address (voice) bits. I might have to test if doing it that was is faster than just using `gpio_put_masked/gpio_put_masked_n` twice (one for offset for the address, one for data) rather than building up a single write.
This is another reason to use PIO.
gpio_put_masked is not exactly unitary, but a kind of read-modify-write, actually a read (full GPIO register) followed by masking, and then a XOR/TOGL to the full GPIO register. PIO uses an arbitrary pin base (actually more) and can work directly with only those pin without any software shifts/masking at output (this is done in hardware).

Statistics: Posted by gmx — Sat Dec 13, 2025 9:36 pm



Viewing all articles
Browse latest Browse all 8082

Trending Articles