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

General • Two state machines with the same code?

$
0
0
Hi all,

Is it possible to have two state machines in the same PIO, using the same code stream, but with different input / output fifos and scratch registers?

What I'm trying to achieve, I have a state machine to read the address from an 8 bit CPU and then pass it to dma to lookup a read/write value and either fetch the byte to be written, or emit it on the (8 bit CPU's) databus. So in both of these cases the 'fetch address' code is identical, so if I could have 2 state machines pointing at the same physical code then it would eliminate this replication, and allow me to fit the whole thing into one PIO.

Cheers.

Phill.

Statistics: Posted by PhillHS — Thu Feb 05, 2026 8:02 pm — Replies 1 — Views 39



Viewing all articles
Browse latest Browse all 7503

Trending Articles