Connect with us

code to control DC motor through PC

Discussion in 'Microcontrollers, Programming and IoT' started by wasim, Mar 15, 2013.

Scroll to continue with content
  1. wasim

    wasim

    3
    0
    Mar 15, 2013
    I want code to control DC motor through PC to PIC18f2620 and L293D using VB6 as GUI. For Serial interfacing i am using RS232 communication via Max 232. plz try to send Entire code
     
  2. davenn

    davenn Moderator

    13,865
    1,956
    Sep 5, 2009
    plz try to help us
    what research into your project have you done so far ?
    Any google searching for appropriate code that you may be able to alter to
    suit your needs ?
    Im sure there are a few on this forum that may be able to help you when you strike particular problems BUT....
    but I will guarantee they wont do all the work for you

    Dave
     
  3. Harald Kapp

    Harald Kapp Moderator Moderator

    11,642
    2,690
    Nov 17, 2011
    The code is only a part of the problem. What does your circuit look like? One will need a schematic diagram for assisting you.
    Break the problem into manageable subtasks:
    - How can you control a Dc motor from your PIC (assuming the PIC has all information for control)? Implement simple commands like turn left, turn right, set speed, stop
    - How can you communicate from PC to PIC? set up the interface routine on the PIC side to receive commands and send data. You can use a simple terminal program on the PC side to test this interface.
    - How can you create a user interface (GUI)? Build a user interface that for starters just logs commands to a data file to verify the functionality.

    Now integrate the three modules into one project:
    - connect the I/O-interface of the GUI to a com port to allow communication with the PIC..
    - Hook up the communication interface on the PIC with the motor control.
    And there you go, ready for fine tuning the setup.
     
  4. wasim

    wasim

    3
    0
    Mar 15, 2013
    control of DC motor through pic controller using driver L293D
     
  5. wasim

    wasim

    3
    0
    Mar 15, 2013
  6. Harald Kapp

    Harald Kapp Moderator Moderator

    11,642
    2,690
    Nov 17, 2011
    Let the VB6 code aside for starters. Try a terminal program and set up communication from the PC to the PIC. once this communication is securely established (baud rate, parity, com port etc.) you can tackle the GUI.
     
  7. dpenelob

    dpenelob

    15
    0
    Mar 27, 2013
    Hi wasim,

    I suggest you start by reading _many_ datasheets, application notes, etc. about this topic first.
    Then, when you have learned to program a µC, send data via RS-232 and write code for both
    your PC and your µC, you will realize how much you gained from your studies in that you are
    able to solve further problems on your own and will probably look back smiling to this request
    for help. I do not mean to be rude, but try to make you first do some research and then ask
    for details; NOT ask for the finished product and unlimited support for free.

    Best regards,
    dpenelob

    P.S.: A good starting point may be this blog.
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-