English
Language : 

MC68HC11G5 Datasheet, PDF (49/195 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcontroller
Freescale Semiconductor, Inc.
4.12 PORT J
Port J is a general purpose 4-bit I/O port which also supports some of the timer functions (see
SECTION 6: PROGRAMMABLE TIMER, REAL TIME INTERRUPT AND PULSE
ACCUMULATOR). Two of the pins are used for input capture/output compare. One of the pins is
used as a clock input for the timer counter registers. The one remaining pin is for general purpose
I/O. Any channels not used for timers may be used as general purpose I/O.
Bit 0 of Port J is used as the TCK input or for general purpose I/O. The data direction is always under
the control of DDRJ bit 0, whether TCK is enabled or not. If the pin is configured as an output by DDRJ
bit 0, the output data in Port J bit 0 becomes the input data to TCK.
Bits 1 and 2 of Port J is used for output compare or input capture or as general purpose I/O. If the
associated output compare is not enabled, the data directions of these pins are dependent on DDRJ
bits 1 and 2. If an output compare is enabled, the associated pin is configured automatically as an
output. If a pin is programmed as an output and input capture is enabled, the output data becomes
the input data to the input capture.
Bit 3 of Port J is a general purpose I/O pin and the data direction of the pin is determined by the state
of DDRJ bit 3. All DDRJ bits are cleared at reset.
4.12.1 Data Register (PORTJ)
7
6
5
4
3
2
1
0
$1031
0
0
0
0
PJ3 PJ2 PJ1 PJ0 PORTJ
RESET:
0
0
0
0
0
0
0
0
Alternate Pin Function: —
—
—
—
— O7/I6 O6/I5 TCK
READ: Any time (inputs return pin levels, outputs return pin driver input levels).
WRITE: Data stored in an internal latch (drives pins only if configured as outputs).
RESET: General purpose high impedance inputs ($00).
4.12.2 Data Direction Register (DDRJ)
7
6
5
4
3
2
1
0
$1032
0
0
0
0 DDJ3 DDJ2 DDJ1 DDJ0 DDRJ
RESET:
0
0
0
0
0
0
0
0
READ: Any time.
WRITE: Any time.
RESET: $00 (all general purpose I/O configured for input only).
0 – Bits set to zero configure the corresponding I/O pins as inputs.
1 – Bits set to one configure the corresponding I/O pins as outputs.
INPUT/OUTPUT PORTS
4-11
For More Information On This Product,
Go to: www.freescale.com