Wrinting incomming data from serial port to textbox 
Author Message
 Wrinting incomming data from serial port to textbox

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

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 .

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


Mon, 30 Sep 2002 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. I/O port, Parallel port, Serial port

2. Is there a script to change the outgoing and incomming port in outlook

3. DLL for reading serial port data

4. help on a serial port data flow

5. read data from serial port using vba for Access

6. Capture Serial Port Data!

7. Sending binary data through serial port

8. Reading data off of a serial port

9. serial data on printer port

10. Receiving binary data from a serial port


12. Serial Port Data to an Array


Powered by phpBB® Forum Software