mc68hc901fn Freescale Semiconductor, Inc, mc68hc901fn Datasheet - Page 36

no-image

mc68hc901fn

Manufacturer Part Number
mc68hc901fn
Description
Multi-function Peripheral
Manufacturer
Freescale Semiconductor, Inc
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
MC68HC901FN
Manufacturer:
FREESCALE
Quantity:
8 831
SECTION 5
GENERAL PURPOSE INPUT/OUTPUT PORT
The general purpose input/output (I/O) port (GPIP) provides eight I/O lines (I0 through I7)
that may be operated as either inputs or outputs under software control. In addition, these
lines may optionally generate an interrupt on either a positive transition or a negative
transition of the input signal. The flexibility of the GPIP allows it to be configured as an 8-bit
I/O port or for bit I/O. Since interrupts are enabled on a bit-by-bit basis, a subset of the GPIP
could be programmed as handshake lines or the port could be connected to as many as
eight external interrupt sources, which would be prioritized by the MFP interrupt controller
for the interrupt service.
5.1 GPIP CONTROL REGISTERS
The GPIP is programmed via three control registers. These registers control the data
direction, provide user access to the port, and specify the active edge for each bit of the
GPIP which will produce an interrupt. These registers are described in detail in the following
paragraphs.
5.1.1 General Purpose I/O Data Register (GPDR)
The general purpose I/O data register is used to input data from or output data to the port.
When data is written to the GPDR, those pins which are defined as inputs will remain in the
high-impedance state. Pins which are defined as outputs will assume the state (high or low)
of their corresponding bit in the data register. When the GPDR is read, data will be passed
directly from the bits of the data register for pins which are defined as outputs. Data from
pins defined as inputs will come from the input buffers.
GPIP7-GPIP0 – General Purpose I/O Port
5.1.2 Active Edge Register (AER)
The active edge register (AER) allows each of the GPIP lines to produce an interrupt on
either a one-to-zero or a zero-to-one transition. Writing a zero to the appropriate edge bit of
MOTOROLA
GPDR REGISTER
RESET
FIELD
ADDR
BIT
0 = Cleared.
1 = Set.
GPIP7
7
0
GPIP6
6
0
GPIP5
MC68HC901 USER’S MANUAL
5
0
GPIP4
4
0
$01
GPIP3
3
0
GPIP2
2
0
GPIP1
1
0
GPIP0
0
0
5-1

Related parts for mc68hc901fn