我現(xiàn)在用44B0+CH375與PC通訊,速度只能達(dá)到30K字節(jié)/秒。請問是驅(qū)動(dòng)程序的問題嗎?我懷疑需要修改驅(qū)動(dòng)程序,將64BYTE緩沖修改成更大的。如果是這個(gè)原因,請?zhí)峁?qū)動(dòng)源程序和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發(fā)送命令數(shù)據(jù),成功 If (CH375ReadData(mIndex, DData, mLength)) Then ' 通過CH375接收應(yīng)答數(shù)據(jù),成功 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