Myke, I am no expert, but I have recently written some VB code with MSCOMM using the Binary mode, and I have both Jan Axelson's book (Serial Port Complete) and Richard Grier's book (Visual Basic Programmer's Guide to Serial Communications) - and I have at a couple of your books too, I might add! :-) Anyway, I'd just like to point out that working with MSCOMM in binary mode means both the input and output bytes are stored in variants that contain byte arrays. Please correct me if I am wrong, but it looks like in your example the mode is actually text, not binary. InputMode can be a 1 or 0, with 0 being comInputModeText, and 1 comInputModeBinary. So if you want to work with binary, I think you would just use the constant comInputModeBinary. You would also store your output data in an array and then give the array to MSCOMM like this, perhaps: Dim aOutput(0 to 1) as Byte Dim Buffer as Variant aOutput(0) = &H14 'A byte to send aOutput(1) = &H15 'A second byte Buffer = aOutput MSComm1.Output = Buffer To receive data, you would then do a similar setup: Dim aInput(0 to 1) as Byte Dim Buffer as Variant Buffer = MSComm1.Input aInput() = Buffer I like using binary because then I can check the InBufferCount value to determine when to read the input buffer. As far as displaying the analog data graphically, have you looked at S-Plot Pro? I haven't used it myself. I'd be curious to hear what solution you come up with for graphically displaying your data. HTH, Patrick Murphy James Valley Colony Box 324 Elie, MB R0H 0H0 myke predko wrote: > 3. Set your initial operating parameters. For working with most > applications, I set the following properties for the MSComm control: > CommPort - "COM#" Serial Port Number to be used > InputLen = 0 - This means that if you use the "OnComm" event, you will be > flagged after each character input > InputMode = 1 - "comInputModeBinary" to read in full binary data. > Private Sub SerPortSend(Data As String) > ' Send the "Data" string out of the Serial Port > > MSComm1.Output = Data > > End Sub > Private Function SerPortRead() As String > ' Poll the Serial Port and if something is available return it, > ' Else, return a Null String > > SerPortRead = "" > > If (MSComm1.InBufferCount <> 0) Then > SerPortRead = MSComm1.Input > End If > > End Function > Comments? > > myke > ----- Original Message ----- > From: "john" > To: > Sent: Sunday, April 01, 2001 7:25 PM > Subject: [EE]:Visual Basic serial interface > > > Hi, > > Im using a 16C71 to send data through a serial port to my PC (analog > > readings) and I want to use VB 6.0 to graphically represent the data. > > Any help would be appreciated. Thank you. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads