Link 18M2 to 2nd 18M2

Casey Jones

New Member
How do i link output from B7 on 1st board so that I can identify it as B1 on the 2nd?
C0-2 & C5-7 are used on both boards.
B1-7 used on board #1
B4-7 used on board #2

I'm using flowchart method for programming in PE6.

Regards

Keith
 

hippy

Technical Support
Staff member
It's not clear how you mean "link" the two together; physically or software wise ?

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.

You would also need to connect the 0V of each board to one another.

Software-wise you can use output B.7 as you normally would, set it high or low, likewise use input B.1 on the other. You could send serial out on B.7 and receive serial in on B.1.

It might be easier to suggest a more refined solution if you could indicate what you are trying to achieve.
 

Casey Jones

New Member
I'm trying to setup signalling for my model railway. I have a 5v ring around the underneath of my base board and both Project Boards are connected to it.
I've got Board #1 controlling a couple of signals Red, Yellow, Green and Board #2 controlling some more.
I want Board #1 to send an output via B7 (Which also goes to my Red LED) to Board #2 B1 so that the program recognizes that the next signal down the line is at Red and changes the previous signal to Yellow.
I've physically used wire connecting B7 to B1 but my program does not see high, only low. I also get a trickle of current back to Board #1 through B7 which causes the Red LED to glow very dimly whilst both Green or Yellow are lit.
 

lbenson

Senior Member
It may help if you change from flowchart programming to programming in the BASIC language. Also your terminology is confusing--B1 and B7 refer to registers (byte-sized containers of values--0-255); B.1 and B.7 refer to pins.

A diagram of your wiring would help. Hippy's suggestion of a 1K resistor in the link between the 2 chips might help. Do you have the 0Vs connected between the two chips so that you have a common ground reference?

Your actual code for the two PICAXEs would also help.
 

Casey Jones

New Member
Just to clarify, the output from Board #1 (with 18M2 Picaxe) is coming from Pin B7 -ve after the Darlington.
I'm then trying to connect to Board #2 (with 18M2 Picaxe) to Port B1 located physically between the Picaxe and Darlington.
Programming in BASIC would be a whole new learning curve for me, if I can avoid it then I will.
At the moment my ACE027 USB connector lead has failed so am unable to program the Picaxe, will try 1K resistor in lead and I hadn't linked the 0V's.
 

hippy

Technical Support
Staff member
I hadn't linked the 0V's
That will likely be the main problem. But also taking the output from after the Darlington. You either need to use a pull-up on the output to +V - but that will invert the signal compared to what's on the B.7 pin - so best to also connect to B.7 between PICAXE and Darlington.
 

Casey Jones

New Member
That will likely be the main problem. But also taking the output from after the Darlington. You either need to use a pull-up on the output to +V - but that will invert the signal compared to what's on the B.7 pin - so best to also connect to B.7 between PICAXE and Darlington.
Thanks Hippy, put wire with 1K resistor and connected to B7 as suggested did the trick for me.
 
Top