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: Mon, 30 Aug 2004 20:38:46 -0500
Delivered-to: gettingstarted at lists dot realsoftware dot com
RealBasic 5.5.3
Writing on Mac OS 10.3.5

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, but I can't get it to read accurately consistently. I've created a button, ReadPort, to open the port. If I feed the form, then hit ReadPort, the data is correct. If I hit ReadPort, then feed the form (which is what I had intended) I get all kinds of strange characters. If I leave out the close in DataAvailable, I never get any correct data.

What I want is to be able to feed form after form with the editField (displayChatsworth) updated for each read.

ReadPort: Action
        dim ChatsworthPort as Integer
        dim POpen as Boolean
        ChatsworthPort = systemInfo 'Find Chatsworth Reader
        Serial1.port = ChatsworthPort 'Set Port Number
        POpen = Serial1.Open

 Sub DataAvailable
        dim SerialData as string
        SerialData = Serial1.ReadAll(Encodings.WindowsANSI)
        serial1.close
        displayChatsworth(SerialData) 'put data in an editField

l have two readers. They both behave the same way.

Obviously, I'm not understanding something here I think I need some examples. Help!

Barry

_______________________________________________
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>