**************************** fadeled.txt (text) **************************** #Func Name: fadeled.pio #Date: 2022EMay30 #Author: Unknown #Category: Projects/PIO/pico in 215 #Code: PIO_ statemachine #Purpose: fadeLed.pio #Article: 177 #Used in fadeLed_pico.py #Remark: PIO is set up by Python code def __init__(self, sm_id, pin, max_count, count_freq): self._sm = StateMachine(sm_id, pwm_prog, freq=2 * count_freq, sideset_base=Pin(pin)) # Use exec() to load max count into ISR self._sm.put(max_count) self._sm.exec("pull()") self._sm.exec("mov(isr, osr)") self._sm.active(1) self._max_count = max_count ***************************************************************************************** /fadeled.txt