View previous topic :: View next topic |
Author |
Message |
DazedAndConfused Guest
|
servo.c positional control help |
Posted: Fri Jan 30, 2009 2:43 pm |
|
|
I was wondering if anyone has modified servo.c (from CCS examples) to include a positional function. The current example only allows to set a direction, and 1 of 4 speeds. I need to set a position with a resolution of 1000 preferably.
I have tried (unsuccessfully) in modifying the code to do as I require. |
|
|
DazedAndConfused Guest
|
no takers |
Posted: Sun Feb 01, 2009 1:30 am |
|
|
No takers as of yet?
Do I need to include other information to make more clear? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Sun Feb 01, 2009 2:08 am |
|
|
It just means that no one has done it, or they don't want to answer.
If you want more help you should post the modified code, and a test
program that calls the modified routines. The code must be compilable.
We should be able to copy and paste it into MPLAB or the CCS IDE and
press the compile button, without any edits required.
Also post a description of what you expect it to do, and a detailed
description of how it fails. Explain observations you have made,
such as with an oscilloscope. Give a full description of your hardware
setup.
Make the code as short as possible. Don't include a lot of "Wizard" code
that is unnecessary, such as code that disables modules that are already
disabled upon power-on reset anyway. (The Wizard puts in code like this). |
|
|
|