programming 8-bit port

Hello. I need advice. I would like to program any of the eight output pins to have access to them once as a single port. Something like OUT port.

Thanks for your ideas

There are some limits to do this but start with Googling “Arduino port manipulation”
Lots of discussions here in the forums, use search, port manipulation.

On an Uno none of the I/O ports makes all 8 pins available to the user. See the Atmel datasheet.

...R

I would like to program a virtual port on any of the 8-pin Arduino.

DiegoCZ: I would like to program a virtual port on any of the 8-pin Arduino.

I don't understand.

...R

PORTD is accessible in full on the '328P boards. Just have to not be using Serial.
Define the pins as inputs or outputs in setup:

for (x=0; x<8; x=x+1){
pinMode (x, INPUT_PULLUP); or
pinMode (x, OUTPUT);
}

Then using them:

// OUTPUT:
PORTD = yourValue;

//INPUT:
readValue = PIND;

Easier with '1284P & '2560 where there are multiple 8-bit ports.

As mentioned, 1284 has multiple ports to use see: https://github.com/nathanchantrell/oswin/blob/master/core/oswin/variants/bobuino/pins_arduino.h

DiegoCZ: I would like to program a virtual port on any of the 8-pin Arduino.

Well, then, do so? Write a function that takes a byte argument and slices it up (preferably as little as possible), writing those values to the pins, probably using direct port manipulation. This will of course be much slower than normal direct port manipulation. This is certainly do-able - whether it makes sense or not, though, depends on your use case (I think likely it does not)