You could use the scratch registers and WAIT ... GPIO ... to implement a divider. You'd use one scratch registers to hold a counter and the other to hold the state. You loop using wait for the clock pin to complete a high/low cycle. Each time one cycle completes you decrement the counter. If the counter reaches zero, you set it back to ten, invert the value register, and then set the value register on the set pins. Something like
where $0 is the input pin from your oscillator.
Code:
LOOP: wait 1 GPIO $0 wait 0 GPIO $0 jmp x-- LOOP set y ::y set pins y set x 9
Statistics: Posted by jags84 — Fri May 03, 2024 2:47 pm