grouping i/o pins
mikea
Posts: 283
I'm using " pulsout 4, 1250" i've found "outa, outb, outc, outd" to group 4 pins together. is there a way to group 2 pins or do i have to use binary? if binary is the least typing would this work...pulsout 0000000000000011,1250 to turn high i/o 0 and 1.thanks-mike
Comments
PULSOUT is for one pin at a time only.
PULSOUT 3 and PULSOUT %11 and PULSOUT%0011 express the same argument.
Here, P0 and P3 blink together --
You could use "OUTA = OUTA | %1100" to set both I/O pins 2 and 3 to high and "OUTA = OUTA & %0011" to set both I/O pins 2 and 3 to low. "OUTA = OUTA ^ %1100" will toggle the current state of both I/O pins.
With Spin you can arrange OUTA as
outa [3..0]
or
outa [0..3]
and that makes a difference.