Analog Devices ADSP-SC58 Series Hardware Reference Manual page 582

Sharc+ processor
Table of Contents

Advertisement

PORT Programming Model
Figure 14-4: GPIO Programming Model Flow (Part 1)
For input mode, first decide the polarity for each pin using the
ter to define the appropriate pins as inputs (write a 0 to the bit location associated with the pin). If interrupt re-
quests are desired, configure the PINT module as shown in the GPIO Programming Model Flow (Part 3) figure
starting at label B. Finally, write the
gramming Model Flow (Part 2) chart shows this entire flow starting at label 3.
For open-drain mode, set all pins low by clearing the
enable the appropriate input drivers. Set the
active state or not (active being 0). The GPIO Programming Model Flow (Part 2) chart shows this flow starting at
label 4.
14–10
START
GPIO OR
PERIPHERAL
GPIO
WRITE PORT_FER TO CLEAR REQUIRED BITS (OPTIONAL IF
PORT_FER HAS NOT BEEN MODIFIED AFTER RESET
INPUT/
OUTPUT
OPEN-DRAIN
GPIO OUTPUT OR
INPUT/OPEN-DRAIN
A
SET
INITIAL STATE
WRITE PORT_DATA_SET FOR REQUIRED PINS
WRITE PORT_DIR_ SET TO ENABLE OUTPUT DRIVERS FOR REQUIRED PINS
SET
CHANGE DIR
WRITE PORT_DIR_SET FOR REQUIRED PINS
CLEAR APPROPRIATE BITS
CHANGE STATE
PORT_INEN
register to enable the associated input drivers. The GPIO Pro-
PORT_DATA
PORT_DIR
ADSP-SC58x/ADSP-2158x SHARC+ Processor Hardware Reference
1
PERIPHERAL
WRITE PORT_FER
TO ENABLE FEATURE
WRITE PORT_MUX
TO SELECT PERIPHERAL
SEE PERIPHERAL
FOR MORE DETAILS
2
CLEAR
WRITE PORT_DATA_CLR FOR REQUIRED PINS
CLEAR
SET &
WRITE PORT_DIR_CLR FOR REQUIRED PINS
CLEAR
YES
NO
DONE
register. Program the
PORT_POL
register. Then, use the
register in this mode to indicate whether the pin is in an
regis-
PORT_DIR
register to
PORT_INEN

Advertisement

Table of Contents
loading

This manual is also suitable for:

Adsp-2158 series

Table of Contents