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

General • Re: Running the statemachine fixed number of cycles

$
0
0
You can loop using JMP instruction. The main program would have to send the number of cycles that the PIO would use to control the loop.
Something like this:
1. PULL
2. MOV X, OSR
3. output A and B pulses
4. JMP X-- to 3.

You might have to slightly adjust the timings to account for extra instructions.

Statistics: Posted by horuable — Sat May 04, 2024 7:10 am



Viewing all articles
Browse latest Browse all 3847

Trending Articles