Trying to integrate Visual Basic with PIC 16f877a


Closed Thread
Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default Re: Trying to integrate Visual Basic with PIC 16f877a

    Quite a while ago I wrote something similar. A Visual Basic program running on a PC that communicated with a PIC through the serial port. Visual Basic will let you fashion a GUI with buttons etc to execute code. I was controlling a pan and tilt servo device, so my buttons were up/down/left/right/center/scan. Each button just sent a command (a number) to the serial port. The PIC listened to the serial port and depending on what command was sent, would drive the proper servo by the desired amount.

    I think I had some handshaking so the PC program knew when the PIC was done.

    For a manipulator arm you might want to have the PIC send back some position info.

    There may be better ways to do this, but this worked and was pretty simple. Visual Basic has lots of serial port examples to start from.

    There are also good Visual Basic tutorials to learn it. But if you have no experience in coding, plan on investing some time.

    Later on, I converted this to a Web page. Visual Web Developer (also part of Visual Studio) has a lot of what Visual Basic has and the programs carry over without a lot of effort. That way you can control the arm over the internet.

    John

  2. #2
    Join Date
    Feb 2011
    Posts
    2


    Did you find this post helpful? Yes | No

    Default Re: Trying to integrate Visual Basic with PIC 16f877a

    there are plently of users here that have done what your trying to to do. VB can easily do what you're trying to do. the trick to it is getting from vb through windows to the pc hardware. i'm still learning but thus far it appears like

    initialize serial port
    open port
    read / write port
    repeat
    when done close port

    of course the syntax is everything. i saw an example on this forum not long ago, so keep digging. i have seen a number of users use hyperterminal to do a quick test of their hardware. i was searching for temperature related projects but there are endless other types too.

    i've switched from VB to delphi, so i think i'll find fewer examples to help me here. good luck, stuggle on and succeed!

  3. #3
    Join Date
    Aug 2008
    Location
    Portugal
    Posts
    240


    Did you find this post helpful? Yes | No

    Default Re: Trying to integrate Visual Basic with PIC 16f877a

    Hi;

    See this post that i posted some time ago. Is an exemple how to work with VB and COM Port to talk to a PIC.

    http://www.picbasic.co.uk/forum/show...2628#post92628
    Thanks and Regards;
    Gadelhas

Members who have read this thread : 0

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

Tags for this Thread

Posting Permissions

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