Serin to Vb


Closed Thread
Results 1 to 10 of 10

Thread: Serin to Vb

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Posts
    7

    Default

    I don't think vb is the problem. I have treid 3 different serial vb examples and all off them is the same, but here is the code

    Private Sub Command2_Click()
    MSComm1.Output = Text3.Text + vbCr
    End Sub


    Private Sub Form_Load()
    MSComm1.PortOpen = True

    End Sub


    Private Sub Timer1_Timer()
    Dim stemp As String

    MSComm1.InputLen = 0
    If MSComm1.InBufferCount Then
    With frmMain
    stemp = stemp + MSComm1.Input

    List1.AddItem stemp

    Text1.Text = stemp & vbCrLf
    Text2.Text = stemp

    End With
    End If

    End Sub

    Johan

  2. #2
    skimask's Avatar
    skimask Guest

    Default

    Well, what happens if you just forget about vB for awhile, and just use Hyperterminal (or whatever)...
    In other words, can you make it work the other way around, the PIC echo's everything the PC sends to it....

  3. #3
    Join Date
    Jun 2007
    Posts
    7

    Default

    Yes with hyperterminal my pic do echo the characters back that I am typing in, but with hyperterminal am I not sending byte by byte as a type ? still new with this
    The only way I get this to work is to create a B0 to B9 var, but with the end program I am not going to know how manny characters i am going to get
    Will pic's with a Uart maybe help me?

  4. #4
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898

    Default

    You don't want to use Timer for that but CommEvents and comEVReceive.

    http://www.rentron.com/receiving_data.htm

    If you want, i have few PDF, just drop me your e-mail in my PM.
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  5. #5
    T.Jackson's Avatar
    T.Jackson Guest

    Default

    Forget about MSComm & timers. Have a look here: http://www.picbasic.co.uk/forum/showthread.php?t=6356

Similar Threads

  1. PIC16f877 code crosses boundary @800h
    By inventosrl in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 6th April 2009, 22:03
  2. serin question?
    By sachymo in forum General
    Replies: 5
    Last Post: - 27th July 2008, 10:04
  3. Problem with PBP interrupt and Serin, please help
    By rgregor in forum mel PIC BASIC
    Replies: 0
    Last Post: - 22nd August 2006, 19:02
  4. USB, PIC18F2550 and VB
    By Tissy in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 27th November 2005, 18:37
  5. SerIn and SerOut
    By Dwayne in forum FAQ - Frequently Asked Questions
    Replies: 0
    Last Post: - 21st July 2004, 15:54

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts