The Godfather talking
You can run, but you can't hide.
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 25, 2024, 11:22:42 23:22


Login with username, password and session length


Pages: [1]
Print
Author Topic: {REQ} How to control a servo using pic  (Read 7595 times)
0 Members and 1 Guest are viewing this topic.
hemidenis
Guest
« on: February 21, 2010, 10:18:44 22:18 »

Hi
Thanks for invite me to this new world, i hope you guys can help me. Need to control a servo for a small project using pic. I purchased a programmer a few moths ago while studding assembler language.
Fortunately for me i came across to a youtube video of a guy using picbasic and i couldn’t believe how this program reduces pages of code to just a few commands.
I downloaded the picbasic from one of the mirrors listed in here, but i appears with a red X when I’m starting the Mplab project wizard, can anyone please tell me what i am doing wrong?. Again i new to this.
Thanks a lot
Logged
sputnik
Junior Member
**
Offline Offline

Posts: 40

Thank You
-Given: 9
-Receive: 39


« Reply #1 on: February 22, 2010, 12:36:50 00:36 »

Hi
Thanks for invite me to this new world, i hope you guys can help me. Need to control a servo for a small project using pic. I purchased a programmer a few moths ago while studding assembler language.
Fortunately for me i came across to a youtube video of a guy using picbasic and i couldn’t believe how this program reduces pages of code to just a few commands.
I downloaded the picbasic from one of the mirrors listed in here, but i appears with a red X when I’m starting the Mplab project wizard, can anyone please tell me what i am doing wrong?. Again i new to this.
Thanks a lot


Just grab the Proton Development Suite (PDS) picbasic compiler and use the IDE it comes with instead of using PBPro and MPLab. IMHO Proton is a much better compiler than PBP, and code is somewhat interchangeable, if not, very easy to convert. It has commands for controlling servos just as PBP has. Controlling servos is VERY easy with either complier though. I would also recommend using the PULSOUT command instead of the SERVO command, its a bit more flexible.

Also, PICBASIC is somewhat used to describe both compilers. If a project or piece of code you find on the web says its for PICBASIC it could be for either. The video you saw could very well be using the Proton compiler.

Also, it actually does not reduce pages of code to just a few lines comparing to assembler as you have used. The ASM generated is actually longer. It just reduces the amount of input needed by you by translating the BASIC code into ASM.  It can be important to note this when you get more involved in PIC programming and want to make use of more critical timing applications and have to calculate execution times etc.
Logged
hemidenis
Guest
« Reply #2 on: February 24, 2010, 03:47:42 03:47 »

Thanks Sputnik i have to dig in all this from zero, so before i complete changed my perspective please take a look to the video, it is in another language but is pretty much self explanative. Thanks

http://www.youtube.com/watch?v=hK7YX4GpN1I
Logged
sputnik
Junior Member
**
Offline Offline

Posts: 40

Thank You
-Given: 9
-Receive: 39


« Reply #3 on: February 24, 2010, 04:28:42 04:28 »

Thanks Sputnik i have to dig in all this from zero, so before i complete changed my perspective please take a look to the video, it is in another language but is pretty much self explanative. Thanks

http://www.youtube.com/watch?v=hK7YX4GpN1I


Yes, I was aware of what you wanted to do, and I have built many R/C servo control devices. The Proton compiler is the way to go and there is plenty of example code out there for driving servos, as well as examples in the help files.  The code in the vid will work for Proton, it supports most of the PBP syntax just for compatibility, but you should redo it in 100% Proton code, its practically identical.
Logged
hemidenis
Guest
« Reply #4 on: February 25, 2010, 08:59:13 20:59 »

Thanks a lot, but Proton Development Suite seem like require some knowledge of patches and so on, is not something that you install and run, with my limited understanding of computers i would probably never make it work, i don’t even want to try to put more software in my computer, this pic programs are definitely not user friendly and I can't even find a video in youtube to check it out.
I really thought that pic was a easiest.

Logged
TomJackson69
Active Member
***
Offline Offline

Posts: 218

Thank You
-Given: 26
-Receive: 63


« Reply #5 on: February 26, 2010, 12:53:54 00:53 »

hemidenis,

Don't give-up so easy. PIC could be very fun and easy to program if you want to spend some time for it. PIC-Basic is also lot easyer than assembly. You have been program in assembly, so, Basic should not a problem for you. All you need is a guide at the beginning. Here is a book that will interesting you:

PIC Robotics by John Iovine.

And here is the link: http://www.sonsivri.com/forum/index.php?topic=3316.0

Download this book, I think you will like it.

It is a good idea if you go to PICBasic forum, there will have more information for you.

Good luck
Logged

Con Rong Chau Tien
sputnik
Junior Member
**
Offline Offline

Posts: 40

Thank You
-Given: 9
-Receive: 39


« Reply #6 on: February 26, 2010, 01:05:47 01:05 »

Thanks a lot, but Proton Development Suite seem like require some knowledge of patches and so on, is not something that you install and run, with my limited understanding of computers i would probably never make it work, i don’t even want to try to put more software in my computer, this pic programs are definitely not user friendly and I can't even find a video in youtube to check it out.
I really thought that pic was a easiest.



Its not hard at all to figure out the patches. The instructions should be included and very clear, and easy.  If you know how to copy and paste a file, you are good to go.
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