Automatic VB6 to pic serial connection


Results 1 to 14 of 14

Threaded View

  1. #1
    Join Date
    Aug 2005
    Posts
    57

    Default Automatic VB6 to pic serial connection

    The attached project files demonstrate how to make an automatic serial connection between a VB6 interface and a pic. This relieves the user from having to know what port the pic is connected to and then manually connect . This is very useful when using a USB to serial converter, as the virtual port numbers can be from com 5 on up and change depending on the USB port being used. The VB6 application functions as follows: As the application loads, the program attempts to open port 1.If this fails, the program errors, leaves the routine, increments the port number and attempts to open the next port. If the opening is successful, the program transmits a character that the pic will recognize, and in turn the pic will begin sending data. The VB6 program will wait for a period of time for data to arrive, if successful the application will finish loading and data will be displayed. If unsuccessful, the program will try all the ports until exhausted, displaying no connection. When the application is shut down, the program transmits a character that the pic will recognize, and in turn the pic will stop sending data. The pic used was a 16F873A. At the very least its another example for serial communication between a pc and a pic. Some of the code was found on VBnet.com and modified.
    Attached Files Attached Files

Similar Threads

  1. Midi, Interrupts and Pic better than SX28?
    By Lajko in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 27th September 2008, 00:26
  2. PIC to PIC "wired" serial one-way communication - SERIN2/SEROUT2
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 14th April 2008, 20:02
  3. PIC to serial with visual basic
    By mbw123 in forum mel PIC BASIC Pro
    Replies: 7
    Last Post: - 31st March 2007, 16:06
  4. PIC to PIC serial resistor?
    By RYTECH in forum Serial
    Replies: 0
    Last Post: - 5th September 2006, 15:46
  5. serial comm from Pic to STAMP
    By d1camero in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 4th April 2004, 23:58

Members who have read this thread : 2

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