Hi,

Some days ago I posted a question about communicating with a dsp evaluation board.

Now, I sometimes receive an Framing error from the DSP, What can the problem be here?

I also think that my code to write to the Textbox isn't that good. It may be a stupid fault becuase I'm programming VB since 2 weeks.

If the input property is set to Binary mode, I receive question marks. And this is not a parity error, because I changed the symbol to "!" in the MSComm property window .

My code to write to texbox. The DSP need to send me some decimal or hexadecimal values, Is the dimention of Instring then good?

Private Sub MSComm1_OnComm()

Dim InString As String
'read entire buffer
MSComm1.InputLen = 0
TextBox.SelStart = Len(TextBox)
Select Case MSComm1.CommEvent

Case comEvReceive

If MSComm1.InBufferCount Then
InString = InString & MSComm1.Input
TextBox.SelStart = Len(TextBox)
'Zet waarden van buffer op het scherm
TextBox = TextBox & InString & vbCrLf
End If

Case comCDTO
MsgBox ("CD timeout")

Case comOverrun
MsgBox ("data lost")

Case comFrame
MsgBox ("Framing Error")

End Select
End Sub

This is what I send to the DSP board, the hexadecimal value 80

Private Sub MenuSend_Click()
Dim StartBit
StartBit = Hex(128)
MSComm1.DTREnable = True ' DTR High
MSComm1.Output = StartBit
End Sub

If somebody please can help me????

Thank you

Viperke