我现在用44B0+CH375与PC通讯,速度只能达到30K字节/秒。请问是驱动程序的问题吗?我怀疑需要修改驱动程序,将64BYTE缓冲修改成更大的。如果是这个原因,请提供驱动源程序和DDK,我们已在年前购买了30片CH375。
44BO端是用中断方式编写的。 VB端程序如下: Private Sub Command9_Click()
Dim DData As INT_PARA Dim mIndex As Integer Dim mLength As Long Dim kkkk As Long Dim cont As Long Dim i As Integer
DData.mByte1 = 3 DData.mByte2 = Text1.Text DData.mByte3 = Text2.Text DData.mByte4 = Text3.Text DData.mByte5 = Text4.Text mLength = 5 mIndex = 0
If (CH375WriteData(mIndex, DData, mLength)) Then ' 通过CH375发送命令数据,成功 If (CH375ReadData(mIndex, DData, mLength)) Then ' 通过CH375接收应答数据,成功 kkkk = CLng(DData.mByte2) + (CLng(DData.mByte3) * 256) + (CLng(DData.mByte4) * 256 * 256) + (CLng(DData.mByte5) * 256 * 256 * 256) Label1.Caption = kkkk Dim boo As Boolean Dim filenbr As Integer mLength = 64 boo = CH375ReadData(mIndex, DData, mLength) tmp.Text = Str(DData.mByte1 + DData.mByte2 * 256) tmp.Text = tmp.Text & "-" & Str(DData.mByte3 + DData.mByte4 * 256) tmp.Text = tmp.Text & ".bin" cont = 0 filenbr = FreeFile Open tmp.Text For Binary As #filenbr Put #filenbr, cont + 1, DData cont = cont + mLength Do While cont < kkkk '23744 21120 mLength = 64 boo = CH375ReadData(mIndex, DData, mLength) 'Put #filenbr, cont + 1, DData cont = cont + mLength Loop Close #filenbr Else MsgBox "CH375ReadData 失败" End If Else MsgBox "CH375WriteData 失败" End If
Beep End Sub