telescope drive
bbrien
Posts: 603
in Propeller 1
Hi, I need some help with some spin code. I want to transfer a pulsed input to a output cog without changing the pulse. There are eight input lines and two motors. any ideas
will be most appreciated.
bbrien
will be most appreciated.
bbrien

Comments
What are these pulses like? What frequency and how long will the pulses be high vs low?
I don't think I understand what you want to do. Do you need to the ability to change the pulses or do you just want to listen in to the pulses?
You'll need to set the pins as outputs.
Then you'll need a loop to monitor the inputs and set the output state.
The above code preserves the input value so you can analyze it in the code if you want.
Regards,
Rich
the14-10-16. I leave for Thailand on16-10-16 I need the info. to program the mount over there.
thanks
Brien S
con _clkmode = xtal1+pll16x _clkfreq = 80_000_000 var long stack1[10], stack2[10], stack3[10], stack4[10] pub main cognew(PinCopy(1, 2, 9, 10), @stack1) cognew(PinCopy(3, 4, 11, 12), @stack2) cognew(PinCopy(5, 6, 13, 14), @stack3) cognew(PinCopy(7, 8, 15, 16), @stack4) pub PinCopy(in1, in2, out1, out2) dira[out1] := 1 dira[out2] := 1 repeat outa[out1] := ina[in1] outa[out2] := ina[in2]However, it's not clear that you actually need to use 4 different cogs, or whether you need to use PASM to get higher speed and less jitter. Could you post more information about your application?bbrien.
Eight input lines and two motors sounds like two bipolar steppers. Is that what you have?
then we might be able to help you.
brien