72CHAPTER 3 PIN FUNCTION (μPD78078 SUBSERIES)3.2.4 P30 to P37 (Port 3)These are 8-bit input/output ports. Beside serving as input/output ports, they function as timer input/output, clockoutput and buzzer output.The following operating modes can be specified bit-wise.(1) Port modeThese ports function as 8-bit input/output ports. They can be specified bit-wise as input or output ports withport mode register 3 (PM3). When they are used as input ports, on-chip pull-up resistors can be connectedby defining the pull-up resistor option register L (PUOL).(2) Control modeThese ports function as timer input/output, clock output, and buzzer output.(a) TI1 and TI2Pin for external count clock input to the 8-bit timer/event counter.(b) TO0 to TO2Timer output pins.(c) PCLClock output pin.(d) BUZBuzzer output pin.3.2.5 P40 to P47 (Port 4)These are 8-bit input/output ports. Besides serving as input/output ports, they function as an address/data bus.The test input flag (KRIF) can be set to 1 by detecting a falling edge.The following operating mode can be specified in 8-bit units.(1) Port modeThese ports function as 8-bit input/output ports. They can be specified in 8-bit units for input or output portsby using the memory expansion mode register (MM). When they are used as input ports, on-chip pull-upresistors can be connected to them by defining the pull-up resistor option register L (PUOL).(2) Control modeThese ports function as low-order address/data bus pins (AD0 to AD7) in external memory expansion mode.When pins are used as an address/data bus, the on-chip pull-up resistor is automatically disabled.