Saturday, January 16, 2010

How to use assembly Mplab to control servo motor?

can anyone help me how to control servo motor rotation forward and reverse using assembly mplab?plz..How to use assembly Mplab to control servo motor?
That's a tall order. A full servo control algorithm, known as a PID Loop (among other names), is rather complex to impliment using assembly. You'd have better luck with the ';C'; language.





Also, as anotyher answerer notes, there is much good information about this and other applications available on the Microship web site.





If you're not locked into Microchip's PIC series yet, I would strongly recommend looking into Texas Instruments' MSP430 series of chips. You can get a development kit for $20 (yes twenty bucks!), and that includes a USB-based in-circuit programmer/debugger, and a fully-functional C-compiler from IAR (whose only limitation is a code-size limit of 4KB, which is plenty for microcontrollers). Google TI MSP430 to find info. Unlike the PIC's, the MSP430 is a true 16-bit processor, one clock per instruction cycle (16Mhz max speed), which needs no external crystal - and it has a 16x16 bit hardware single-cycle nultiplier, which is crucial for impolimenting servo PID loops...





Good luck!How to use assembly Mplab to control servo motor?
Since you're using MPLAB, I assume you are working with Mocrochip devices. They have several different kinds. They also have a good library of data and application notes. Choose a device that is designed to be used as a motor controller. You'll also need an H-Bridge, which is basically a two pole switch (using transistors) that can reverse the positive and negative lines to the motor. The PIC controls the H-Bridge.





There are a whole lot of additional things you can add, like sensors to detect current draw, motor speed, shaft position etc. But to just turn on and reverse a motor, check the second citation: The Complete BJT Circuit.





Microchip also has some very good forums. A lot of help can be found there.

No comments:

Post a Comment