From what I understand, a servo motor (a hobby one, like Parallax/Futaba) requires a certain pulse coded modulation, i.e.
>1.5ms on-time in a 20ms period - clockwise rotation
<1.5ms on-time in a 20ms period - anti-clockwise rotation
Am I correct on the above and is it possible to generate this by code alone?
For example:
An as a side note, lets say I have 3 stepper motors being controlled by a single PIC. Is a single source of 5V sufficient for all 3 motors (i.e. 1 source for all three motors, not 1 each)?
>1.5ms on-time in a 20ms period - clockwise rotation
<1.5ms on-time in a 20ms period - anti-clockwise rotation
Am I correct on the above and is it possible to generate this by code alone?
For example:
Rich (BB code):
// Hi-Tech C
// Crystal Oscillator used is 20MHz
#include <pic.h>
#include <htc.h>
void main()
{
while(1)
{
RB0 = 1;
__delay_ms(1.5);
RB0 = 0;
__delay_ms(20);
}
}