Contact Us 
   

IO Port B on the H8/3664 Processor

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.

PIN   Alternate Function
PB0   AN0
PB1   AN1
PB2   AN2
PB3   AN3
PB4   AN4
PB5   AN5
PB6   AN6
PB4   AN7

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

 

Port 1IO port 1 registers and usage
Port 2IO port 2 registers and usage
Port 5IO port 5 registers and usage
Port 7IO port 7 registers and usage
Port 8IO port 8 registers and usage
Port BIO port B registers and usage
Timer Ausing 8-bit Timer A
Timer Vusing 8-bit Timer V