I've made a circuit with a 28x1 that switchs 16 relays on/off and it all works fine except when I use the command
or
if I use the code
or any other combination where outputs 1&2 are both on then the outputs both work, but when I use code with either output on its own they don't work ???????
I've used the same code with another 28x1 and got the same result
Am I being incredibly dumb or is this a quirk of portc pins ?
I would be grateful if someone would put me out of my misery
full version of program (minus the other 12 options for clarity) is as follows...
Code:
let pinsc =%00000100
Code:
let pinsc =%00000010
Code:
let pinsc =%00000110
I've used the same code with another 28x1 and got the same result
Am I being incredibly dumb or is this a quirk of portc pins ?
I would be grateful if someone would put me out of my misery
full version of program (minus the other 12 options for clarity) is as follows...
Code:
symbol switchs=w0
symbol counter=b1
startup:
let dirsc=%11111111
let pinsc=%00000000
start:
counter=0
readadc10 2,switchs
if w0>1010 and w0<1025 then route1
if w0>950 and w0<965 then route1A
if w0>925 and w0<930 then route2
if w0>830 and w0<845 then route2A
if w0>685 and w0<700 then route3
if w0>505 and w0<515 then route3A
if w0>315 and w0<320 then route4
if w0>265 and w0<275 then route4A
if w0>230 and w0<235 then route5
if w0>145 and w0<165 then route6
if w0>125 and w0<130 then route7
if w0>80 and w0<90 then route7A
goto start
route3A:
counter =counter+1
if counter=10 then start
let pins =%00000000
let pinsc =%00000110
pause 200
pinsc=0
goto route3A