Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 13, 2024, 11:32:34 23:32


Login with username, password and session length


Pages: [1]
Print
Author Topic: dual pwm with picbasic  (Read 7566 times)
0 Members and 1 Guest are viewing this topic.
hamid9543
Active Member
***
Offline Offline

Posts: 124

Thank You
-Given: 80
-Receive: 7


« on: July 31, 2007, 12:13:06 12:13 »

hi
i want to control 2 dc motor.i need to 2 pwm (synchronice) for control that.

can any body help me?
Logged
sherm
Junior Member
**
Offline Offline

Posts: 44

Thank You
-Given: 14
-Receive: 9


« Reply #1 on: July 31, 2007, 12:45:03 12:45 »

Controlling DC motors with a pic is a fairly simple process. You're best off using a H-Bridge arrangement to control each motor. National make a dual channel H-Bridge controller that has excellent characteristics, including feedback or EMF. What's more, you can, or at least could, get them under their samples programme. I got a bunch of them a few years ago now to do tests for controlling motors to open the roof panels on a green house. They worked really well.

You can find data on them here ... http://www.national.com/pf/LM/LMD18200.html

The only problem with them is the unusual footprint. They don't lend themselves to easily inserting in a breadboard for experimenting. That problem was solved by Sparkfun Electronics. They've made a break out pcb for that exact purpose. Find more info on it here ... http://www.sparkfun.com/commerce/product_info.php?products_id=747

If you do a search or two in Google, you should be able to find some example code for driving the LMD1820x series from PicBasic Pro.

Good luck Smiley
Logged
hamid9543
Active Member
***
Offline Offline

Posts: 124

Thank You
-Given: 80
-Receive: 7


« Reply #2 on: July 31, 2007, 05:14:07 17:14 »

thanks
i used pic16f877 & l293d. conect ccp1(16f877) to enable1(l293d) and ccp2 to enable2. i want to make 2 pwm  on ccp1 and ccp2 for control 2 dc motor .i configuration ccp1 but i have not configuration ccp2. can you help me?
software:pic basic pro
Logged
mcr
Junior Member
**
 Muted
Offline Offline

Posts: 90

Thank You
-Given: 217
-Receive: 23


« Reply #3 on: July 31, 2007, 10:16:23 22:16 »

Download the manual from Microengineering labs and read the HPWM instruction.... or visit this link http://www.melabs.com/resources/pbpmanual/

Search for the HPWM instruction, there you'll find what you're looking for.

If you only need 8 bits of resolution, if you want the 10 bits, use this link: http://www.microengineeringlabs.com/resources/samples/pbp/hardpwm.bas

Remember that you can only have different PWM signals, not different frecuencies.


Hope it helps.



PS: HPWM 2 (this is the channel),xxxx duty cicle, xxxxx frecuency
« Last Edit: July 31, 2007, 10:19:15 22:19 by mcr » Logged
hamid9543
Active Member
***
Offline Offline

Posts: 124

Thank You
-Given: 80
-Receive: 7


« Reply #4 on: August 01, 2007, 04:38:13 04:38 »

hi
your answer very usefull for me
thanks
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC