danners430
Member
Hey guys,
I've got a quick question regarding one of the answers to the picaxe interfacing FAQ, namely the answer regarding additional outputs (title "I need more outputs - what can I do?")
It recommends using the following code (based on two 20M2s):
This allows you to control the B pins on the connected microcontroller. My question is, is there a way to also control the C side with this system? My guess is that I would have to take into account the pins being used for the serial transfer, and set these to inputs within the first line of code.
In this example I've kept the serial input for the B side on C.0, and connected the input for the C side into C.6. The two sides operate on seperate parallel programs, to simplify the operation.
Would this work? I plan on using an 18M2 connected to a 14M2, obviously the program would be slightly altered. Any feedback would be most welcome.
cheers
I've got a quick question regarding one of the answers to the picaxe interfacing FAQ, namely the answer regarding additional outputs (title "I need more outputs - what can I do?")
It recommends using the following code (based on two 20M2s):
Code:
let dirsb = $FF
main: serin C.0, N2400, b1
let pinsb = b1
goto main
Code:
start0:
let dirsb = $FF
let dirsc = $BE 'Pins C.0 and C.6 set to inputs
main0: serin C.0, N2400, b1
let pinsb = b1
goto main
start1:
pause 100 'Allow time for dirs command to come into effect - a little overkill, but better safe than sorry
main1:
serin C.6, M2400, b2
let pinsc = b2
goto main
Would this work? I plan on using an 18M2 connected to a 14M2, obviously the program would be slightly altered. Any feedback would be most welcome.
cheers