原先我使用 CH341 芯片, 我的 python 呼叫 CH341DLL.DLL 無法使用, 但呼叫 CH341DLLA64.DLL 可正常使用, 為了使用 100khz I2C 現在改用 CH347, 但是找不到 CH347DLLA64.DLL, 只有 CH347DLLA64.LIB(我不知道如何用 Python 呼叫), 使用 CH347DLL.DLL 又無法正常工作.....能否提供 CH347DLLA64.DLL?
查看: 3581
回复: 4
CH347T DLL file 問題
热门产品 :
CH339: 7端口多功能USB HUB控制器芯片
您好,CH347DLL可在官网获取:/downloads/CH341PAR_ZIP.html
您能够调用CH341DLLA64.DLL是因为您Python版本应该是64位的。
我在 python 中調用CH347DLLA64.DLL
調用CH347StreamI2C 讀取 I2C 資料, 發現讀回來的資料要從第 4 個 byte 開始有效...要怎麼處理呢?
調用CH347GPIO_Set, 無法設定 GPIO1, GPIO2 的 HI/LOW, GPIO7 的輸出時有時沒有, 我使用這3個設成輸出, 其餘GPIO0,5,6 為輸入
time ctypes * CH347devid = dllName = dll = cdll.LoadLibrary(dllName) handle = dll.CH347OpenDevice() (handle) ver = dll.CH347SetTimeout() idir = c_ubyte() ilevel = c_ubyte() dll.CH347GPIO_Get(byref(idir)byref(ilevel)) ((idir.value)) ((ilevel.value)) ienable = c_ubyte() idir = c_ubyte() ilevel = c_ubyte() ver = dll.CH347GPIO_Set(byref(ienable)byref(idir)byref(ilevel)) time.sleep() (ver) ver = dll.CH347GPIO_Get(byref(idir)byref(ilevel)) ((idir.value)) ((ilevel.value)) ver = dll.CH347I2C_Set() (ver) ver = dll.CH347I2C_SetDelaymS() (ver) ienable = c_ubyte() idir = c_ubyte() ilevel = c_ubyte() dll.CH347GPIO_Set(byref(ienable)byref(idir)byref(ilevel)) ver = dll.CH347GPIO_Get(byref(idir)byref(ilevel)) ((idir.value)) ((ilevel.value)) val = c_ubyte() dllver = c_ubyte() bcddev = c_ubyte() chiptype = c_ubyte() ver = dll.CH347GetVersion(byref(val)byref(dllver)byref(bcddev)byref(chiptype)) (ver) (val) (dllver) (bcddev) (chiptype) dat = c_ubyte * ((dat)) data = dat() ((data)) idata = (c_ubyte * )() time.sleep() length = (idata) (lengthidata[]) val = c_int8() (ver) val = c_ubyte(val.value) ((val.value)) () idata = (c_ubyte * )() data = dat() ver = dll.CH347StreamI2C(dataidata) (ver) i (): (i(idata[i])) dll.CH347ReadEEPROM(idata) i (): (i(idata[i])) idir = c_ubyte() ilevel = c_ubyte() dll.CH347GPIO_Get(byref(idir)byref(ilevel)) ((idir.value)) ((ilevel.value)) ienable = c_ubyte() idir = c_ubyte() ilevel = c_ubyte() ver = dll.CH347GPIO_Set(byref(ienable)byref(idir)byref(ilevel)) time.sleep() (ver) ver = dll.CH347GPIO_Get(byref(idir)byref(ilevel)) ((idir.value)) ((ilevel.value)) ienable = c_ubyte() idir = c_ubyte() ilevel = c_ubyte() ver = dll.CH347GPIO_Set(byref(ienable)byref(idir)byref(ilevel)) time.sleep() (ver) ilevel = c_ubyte() idir = c_ubyte() ienable = c_ubyte() ver = dll.CH347GPIO_Set(byref(ienable)byref(idir)byref(ilevel)) time.sleep() (ver) ver = dll.CH347GPIO_Get(byref(idir)byref(ilevel)) ((idir.value)) ((ilevel.value)) dll.CH347CloseDevice() (): ()
我的測試程式如上...麻煩幫我看看哪裡有問題
您好,若您使用的工作模式1,则RTS1上存在下拉电阻,在开始时其GPIO电平为低电平,您可将您调用部分完整代码通过邮件发送到我司技术邮箱tech@wch.cn,方便我们Check排查。
请勿发布广告和违法内容, 代码可以选择编辑器代码语言格式, 更易他人阅读帮助您, 或者留下联系方式,以便更好更快服务您
只有登录才能回复,可以选择微信账号登录