gettingstarted
[Top] [All Lists]

Serial Port Problems

To: gettingstarted at lists dot realsoftware dot com
Subject: Serial Port Problems
From: Barry Lumpkin <barrylum at bellsouth dot net>
Date: Tue, 31 Aug 2004 11:13:01 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
Aaron, thanks for your help. I believe the wrong encodings setting was causing a big chuck of the problem. I think I may still have a problem though and here are the details:

I'm working with a Chatsworth Data Optical Card Reader, APC 100. The Chatsworth has a FTDI Chip with a driver that makes a USB port think it's a serial.

The system finds the fake serial port fine. I'm supposed to get 111 ASCII characters when I do a ReadAll. Instead of getting all 111 characters in one read, evidently DataAvailable fires two or three times before I get the entire string. Right now I'm combining the reads via a EditField to come up with all 111 characters.

Is this normal behavior or do I need to rewrite something?

Serial1 DataAvailable Code:

Sub DataAvailable()
  dim SerialData as string
  if val(editField5.text) >= 111 then
    editField5.text = ""
    editField3.text = ""
  end if
  SerialData = Serial1.ReadAll(Encodings.ASCII)
  editField3.text = editField3.text + SerialData
  editField5.text = str(len(editField3.text))
End Sub

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>