ATMega GPIO ports. Write in PINn register.

I try to understand AVR ATMega GPIO ports.
I understand that the PINn register is intended for reading data, but via binary operations it is possible to write data to it.
What happens in this case? On some sites it is written that for the ATMega controllers a logical 1 change the PORTn register state.
What will happen in other situations?
Thank you.

GPIOports.jpg

Extract from the Atmega 328 datasheet

13.2.2 Toggling the Pin
Writing a logic one to PINxn toggles the value of PORTxn, independent on the value of DDRxn.
Note that the SBI instruction can be used to toggle one single bit in a port.

When in doubt always refer to the datasheet.

…R

Oh! Thank you very much! I thought that such a situation would not be described in datasheet. :)

dimok111: I thought that such a situation would not be described in datasheet. :)

If it is not in the datasheet it does not exist. If it does exist then it is in the datasheet.

The datasheet is the bible.

...R

Robin2: The datasheet is the bible.

Indeed - it contains truth and wisdom from the creator, cloaked in strange and obtuse verbiage.

DrAzzy: Indeed - it contains truth and wisdom from the creator, cloaked in strange and obtuse verbiage.

Any 3 pages is better than 6 sleeping pills :)

...R