'877 and Visual Basic 6


Closed Thread
Results 1 to 3 of 3
  1. #1
    Tomas's Avatar
    Tomas Guest

    Default '877 and Visual Basic 6

    Hi there,
    I want to send some data from my PICF877 to a standard PC using RS232 protocol with RS232 driver. The code from '877 will "listen" to if a certain button is pressed, RECEIVE in the VB GUI program. If so the '877 will send the data and from PC side a VB GUI will display the data.
    I have read that i can use serout2 and serin2 to send and receive in the '877 side, but how do i actually do that. How does the VB know that data is available?
    I'm using PicBAsic Pro to program my '877 and i have got VB 6 installed in my computer. How and from where do i start?

    Thanks in advance,
    Tom.

  2. #2
    phickman's Avatar
    phickman Guest


    Did you find this post helpful? Yes | No

    Default

    Tom,

    In my line of work, I normally communicate with the PIC MCU via parallel mode (8-wire). Recently I have switched from using the Assembly language to PIC Basic pro.

    The MSComm control that ships with VB6 sounds like the control that you would need to use (a sample of how to use this application is on the VB6 CD as well as MSDN CD). You would use the MSComm1.Open command to open a comm-link between the MCU and VB.

    There is an event called OnComm. When this event fires, read using the MSComm1.Input command.

    Another possiblity is to use the GreenLeaf CommX control which allows for more control over the comm port (http://www.greenleafsoft.com). I have used this control with great success over the past five years.

    One thing that I have found to be extremely helpful while debugging serial comms applications has been to use either Hyperterminal or ProComm to test communications from the MCU end.

    Hope this has helped somewhat.

  3. #3
    phickman's Avatar
    phickman Guest


    Did you find this post helpful? Yes | No

    Default

    Update:

    I just found a Website that you might be interested in:

    http://www.piclist.org/techref/picli...comm/index.htm

    It has a downloadable VB app you may want to check out.

Members who have read this thread : 1

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