Maker Pro
Maker Pro

code to control DC motor through PC

wasim

Mar 15, 2013
3
Joined
Mar 15, 2013
Messages
3
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
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
plz try to send Entire code

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
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
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.
 

wasim

Mar 15, 2013
3
Joined
Mar 15, 2013
Messages
3
control of DC motor through pic controller using driver L293D
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,700
Joined
Nov 17, 2011
Messages
13,700
- 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.
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.
 

dpenelob

Mar 27, 2013
15
Joined
Mar 27, 2013
Messages
15
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.
 
Top