Thank you very much, problem solved.You can't do 'SET Y,118'. The maximum value for SET is 31.
The common way to deal with needing large constants is to load them into one of the other registers - ISR, OSR, X, whichever you aren't using, and then MOV Y,<whichever> in place of SET Y,<value>.
You can load the value into the register with forced-execute instructions before starting the SM, so that the load doesn't use up any of your precious program instructions.
In your case, since it's a purely output application, ISR seems like a good choice for a spare register.
It was indeed caused by the SET instruction.
I forgot that I should load the porch cycle to ISR rather than Y.
Code:
sm_bus.put(118) # back porch cyclessm_bus.exec("pull()")sm_bus.exec("mov(isr, osr)") ######################### should be loaded to ISR first, and using pioasm to load ISR to Ysm_bus.put(899) # data valid cyclessm_bus.exec("pull()")sm_bus.exec("mov(x, osr)")
Statistics: Posted by b0wen — Mon Apr 08, 2024 7:34 am