is simultaneous port reading in Atmega possible?

hi guys,
I want to know weather i can use a programme line like this
if( PORTA == B10001111 );
for Arduino Atmega? :astonished:

Yes, that is valid.

Whilst it is valid, it doesn't read any pins....

    if (PINA == B10001111)
    {
      // action
    }

is how to read ports - for each port there is a port-input register,
PINB, PINC, PIND etc. PORTB, PORTC etc are the output flip-flops
used to control output pins.

As the above comment mentioned, I want to perform a task function if all the pins of port A are high. Is that mean, by above method I can perform it?

ahteranga:
hi guys,
I want to know weather i can use a programme line like this
if( PORTA == B10001111 );

And as MarkT said to read you use PINA not PORTA.

ahteranga:
As the above comment mentioned, I want to perform a task function if all the pins of port A are high. Is that mean, by above method I can perform it?

Well, B10001111 is hardly all the pins.

thank u very much guys.....