Trying to integrate Visual Basic with PIC 16f877a


+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    vtolentino's Avatar
    vtolentino Guest

    Talking Trying to integrate Visual Basic with PIC 16f877a

    Hello buddies,

    I'm new here and this is my first post. The last year of Mechatronic Engineering course is driving me crazy.
    My classmates and myself are trying to build a manipulator arm assisted by computer.
    The idea is the following:
    1. Design the mechanical arm;
    2. Program a PIC so as to control the arm
    3. Control the arm from the computer by a interactive screen where the users could input values of coordinates.

    The first big problem we've found was the fact we don't know how to build a software capable to control an external equipment (manipulator arm).
    I've found some materials concerning the integration HMI - Human Machine Interface. As I'm a novice in this field of expertise, I'd like to know if you guys could lead us or even give us some tips.
    I intend to use Visual Basic to send a signal in order to control the manipulator arm, though I don't know if it's the best solution. I mean, maybe there is another way to control a external equipment with a interactive screen (computer).
    OBS: We don't have any experience in Visual Basic.

    Please, let me know you can help me !!!

    Thanks in advance,


    Victor Oliveira Tolentino

  2. #2
    Join Date
    Feb 2009
    Posts
    36

    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

  3. #3
    Join Date
    Feb 2011
    Posts
    2

    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!

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

    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

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