Pin Functions - Hitachi H8S/2646 Hardware Manual

Hitachi 16-bit single-chip microcomputer h8s/2646 series
Table of Contents

Advertisement

Port J Register (PORTJ)
Bit
:
7
PJ7
Initial value :
—*
R/W
:
R
Note: * Determined by the state of PJ7 to PJ0.
PORTJ is an 8-bit read-only register that shows the pin states. It cannot be written to. Writing of
output data for the port J pins (PJ7 to PJ0) must always be performed on PJDR.
If a port J read is performed while PJDDR bits are set to 1, the PJDR values are read. If a port J
read is performed while PJDDR bits are cleared to 0, the pin states are read.
After a reset and in hardware standby mode, PORTJ contents are determined by the pin states, as
PJDDR and PJDR are initialized. PORTJ retains its prior state in software standby mode.
9.15.3

Pin Functions

As shown in table 9-33, the port J pin functions can be switched, bit by bit, by changing the values
of OE2A to OE2H of motor control PWM timer PWOCR2 and PJDDR.
Table 9-33 Port J Pin Functions
OE2A to OE2H
PJDDR
Pin function
6
5
PJ6
PJ5
—*
—*
R
R
1
Motor control PWM
timer output
4
3
PJ4
PJ3
—*
—*
R
R
0
0
PJ7 to PJ0 input
2
1
PJ2
PJ1
PJ0
—*
—*
R
R
1
PJ7 to PJ0 output
0
—*
R
291

Advertisement

Table of Contents
loading

Table of Contents