If all of the wires are on the same port, then yes you can.
For example if all of your data pins were on Port C, you could use:
PORTC = 21; //set bits 0,2,4 to a 1, the rest to 0.
If all of the wires are on the same port, then yes you can.
For example if all of your data pins were on Port C, you could use:
PORTC = 21; //set bits 0,2,4 to a 1, the rest to 0.