Connecting the pins of two picaxe together

GAP

Senior Member
I am using a 08M2 as a servo driver that will get command inputs from an 18M2 which has already 4 servos connected.
The 18M2 is driving servos that move point blades on a model railway and the 08M2 will move semaphore signal blades
Can I just connect the output pins of the 18M2 to the input pins of tha08M2 or do I need a resistor connected each leg somewhere?
Attached is a drawing of what I plan to construct.
Any help greatly appreciated.
 

Attachments

  • 0000.png
    0000.png
    72.8 KB · Views: 9
Can I just connect the output pins of the 18M2 to the input pins of tha08M2 or do I need a resistor connected each leg somewhere?
I think that Hippy 's earlier post #2 in the thread eclectic gives above has a more specific answer to your original question:
"Physically you can just take a wire from your B.7 output and run it to B.1 input on the other, though it would be better to use a 1K resistor instead of a wire link to avoid issues should both ever be outputs."
 
I'm asking this because I am using AI to write my code.
It has suggested this which I find a bit odd, dragging a line that is going to carry servo signals to GND just doesn't seem right.
The use of a 1K resistor in series to protect the pins as suggested sounds better.
One signal-board change is still needed: add a separate 10 kΩ pull-down from each 08M2 command input to GND
Those resistors go in parallel with the command wires, not in series.

18M2 C.2 ───── 08M2 C.3 (leg 4)
│
10 kΩ
│
GND

18M2 C.7 ───── 08M2 C.4 (leg 3)
│
10 kΩ
│
GND
 
I'm asking this because I am using AI to write my code.
It has suggested this which I find a bit odd, dragging a line that is going to carry servo signals to GND just doesn't seem right.
The use of a 1K resistor in series to protect the pins as suggested sounds better.
One signal-board change is still needed: add a separate 10 kΩ pull-down from each 08M2 command input to GND
Those resistors go in parallel with the command wires, not in series.

18M2 C.2 ───── 08M2 C.3 (leg 4)
│
10 kΩ
│
GND

18M2 C.7 ───── 08M2 C.4 (leg 3)
│
10 kΩ
│
GND
That's why I don't trust AI for technical information. It is too easy for AI to copy someone else's errors (or even copy/perpetuate AI errors).
 
I have got this all wrong I was thinking that I am putting servo signals into the second picaxe when in fact I am just inputting a logic level that causes the second picaxe to output servo signals to drive the servo.
So in this case the AI has got it right and the NI (natural intelligence) got it wrong.
I asked for an example and this what it came up with

Here is a one-servo example for the signal 08M2. It assumes the 08M2’s C.3 input is wired to the crossover 18M2’s C.2 output:
' Signal PICAXE-08M2 only
' Example values only — not calibrated for your servo

servo C.1, 120 ' Start servo pulses on Signal Servo 1
pause 30

do
if pinC.3 = 1 then
servopos C.1, 150 ' Crossover C.2 is HIGH: move to state A
else
servopos C.1, 120 ' Crossover C.2 is LOW: move to state B
endif
loop

Looks OK to me
 
Hi,

It [AI] has suggested this which I find a bit odd, dragging a line that is going to carry servo signals to GND just doesn't seem right.
The use of a 1K resistor in series to protect the pins as suggested sounds better.

The 10k pulldown resistors are probably intended to guarantee a 0 level before the 18M2 (program) has booted up (when the outputs are tristate/floating). This is necessary when driving power FETs, but here, it is more sensible to ensure that the 08M2 program behaves correctly during the power-up situation (e.g. a PAUSE at the start of the program) and/or if the 18M2 program goes berserk.

The (1k) series resistors are a sensible precaution when linking (potentially) Output pins. But this can never happen with the 08M2 C.3 (Leg4) because it is "Input Only". So here the series resistor is unnecessary, but in rare situations (not here) an external "Electrostatic Protection" catching diode (to the supply rail) can be worthwhile, because there cannot be one inside the chip (it is taken above the supply rail when Programming the Base PIC).

Theoretically, a series resistor could/should be fitted for the 08M2 C.4 input (Leg3), but it's hardly necessary in practice: The "High" output driver FETs in the PICs are quite "weak" so that, even if accidentally connected to a "Low" Output pin, the current is unlikely to be dangerous (nothing like as high as could flow if a Low Output pin is shorted directly to the supply rail).

Cheers, Alan.
 
Back
Top