>from the help line
>I'm trying to write to a port with consecutive port pins, so I selected port 2, with pins 2.0 to 2.9 available. But now I find I need one more pin. Can I use P2.10? I see it's marked 'boot', but after I've booted into 'C', is that pin available?
Yes you can output on port 2.10
consecutive port pins
Re: consecutive port pins
i need to set 7 IO pins LOW, so I can set 1 of the 7 HIGH. Can I write to 7 IO pins in one instruction, or do I have to do each individually? Five pins are Port0, one is Port1, and one is Port 2.
Re: consecutive port pins
As they are on 3 different ports that would require at least 3 different writes, so they will not happen at exactly the same time (depending on the device about 50 nsec apart), so if you are controlling motors you would want to "break before make", in other words set all to 0, then set the desired bit high.
The 32 bit GPIO pins per port can be controlled by SET or CLEAR registers (the way I normally do it, writing 1 in a bit sets or clears, writing 0 has no effect). Or you can use mask bits and then write the corresponding value to the pin register.
The 32 bit GPIO pins per port can be controlled by SET or CLEAR registers (the way I normally do it, writing 1 in a bit sets or clears, writing 0 has no effect). Or you can use mask bits and then write the corresponding value to the pin register.