浜松ホトニクスc12880maをRaspberry Pi Pico、MicroPythonで使う(1)
PIOを使って任意のクロックを発生させ、正確な蓄積時間で積算する。
def pulse():
#
# One cycle is 8 clocks.
# Set ST signal to Sideset.
#
pull()
mov(y, osr)
pull()
mov(x, osr)
label('accumulation')
set(pins, 0).side(1) [1]
set(pins, 1)
jmp(y_dec, 'accumulation')
# 88 Pulse Generation
label('loop')
set(pins, 0).side(0) [1]
set(pins, 1)
jmp(x_dec, 'loop')
set(pins, 0)

