视频讲解
https://www.bilibili.com/video/BV1Nu4m1w7iv/?vd_source=5ba34935b7845cd15c65ef62c64ba82f
pywinio库
https://pypi.org/project/pywinio/
安装库
pip install pywinio
寄存器地址
测试代码
import pywinio
winio = get_winio()
# 设置排针2输出1,0x40是bit6置1
winio.set_port_byte(0xA02, 0x40)
# 设置排针2输出0
winio.set_port_byte(0xA02, 0x00)