Dear JB,

> When I plug the data cable into any pin on the entire board the
> servo spins clockwise, even when plugged into PWM0 and (pwm-stop 0)
> being called.

Understand. The servo might be responding that way to the default
level of the pins on the Mizar32. What does your multimeter say for
the level of the pin?

> clockwise, even when plugged into PWM0 and (pwm-stop 0) being called.

OK; We'll get to the PWM itself in just a bit.

> On another point is there a dedicated ground pin?

Sure; I've used it long ago but I can't remember exactly which pin in
the JTAG connector; But I can tell you how to find it. Put your
multimeter in beeper mode (it beeps when the circuit is closed and
keeps quiet when there's no connection). Put one of the probes of your
multimeter on the GND of your voltage regulator.

Well, I can tell you that the GND on the voltage regulator should the
the pin in the middle. The other probe touches the pins at the 4
corners of your JTAG connector (the left most pin in the bottom row;
The one closer to the SD card is the one if I can remember
correctly). One of the combinations will trigger a beep; And you'll
find your GND pin.

> I plugged the PWM0 port into an oscilloscope and it was littered
> with static, according to my electrical engineering tutor there is a
> bad ground and I need to earth it.

Have you tried this [1] example? Can you please check if you can
reproduce this example with an LED OR even better, remove the LED and
put the probes of the oscilloscope there. You should see the
waveform. We can then workout your specific example. We first make
sure your connections are OK.

> Another another point, my LCD display still doesn't work and I don't
> know what to do about it.

I'll get back to you on the LCD.

R

References:
[1]:
https://github.com/simplemachines-italy/examples/blob/master/pwmled/pwm-led.l

On 19 January 2016 at 21:02, J B <k1llfre...@hotmail.co.uk> wrote:

> I'm trying to use the PWM module to control a parallax servo I purchased.
> I'm trying to get it to spin both ways as I need it for a project, I have
> tried to spin the servo both clockwise and anti clockwise but I do not know
> how to set a 20ms gap between each pulse, I need 1.7ms to go anti clockwise
> with a 20ms gap and 1.3ms with a 20ms gap to spin clockwise. I've converted
> the ms into frequency but it doesn't change the direction. When I plug the
> data cable into any pin on the entire board the servo spins clockwise, even
> when plugged into PWM0 and (pwm-stop 0) being called.
>
> On another point is there a dedicated ground pin? I plugged the PWM0 port
> into an oscilloscope and it was littered with static, according to my
> electrical engineering tutor there is a bad ground and I need to earth it.
>
> Another another point, my LCD display still doesn't work and I don't know
> what to do about it.
>
> The attachment is a datasheet for the servo I bought.
> Thanks.
>

Reply via email to