Port B is an input only port also functioning as an A/D converter analog input pin. Only 4 pins, PB0 to PB3, are available in the shrink-dip packaged part.
One register control its functions:
• Port data register B (PDRB)
PDRB simply holds the state of the pins on port B.
Using the header files provided with the GNUH8 toolchain, port B and its registers are found in the IO address space and can be accessed using statements like these:
unsigned char value; int data; data = IO.PDRB.BIT.B2; // read a single bit into an integer variable value = IO.PDRB.BYTE; // read an entire byte