参数资料
型号: ST52510F3M6
厂商: STMICROELECTRONICS
元件分类: 微控制器/微处理器
英文描述: MICROCONTROLLER, PDSO20
封装: SOP-20
文件页数: 85/136页
文件大小: 3335K
代理商: ST52510F3M6
Obsolete
Product(s)
- Obsolete
Product(s)
7 I/O PORTS
7.1 Introduction
ST52F510/F513 are characterized by flexible
individually programmable multi-functional I/O
lines. The ST52F510/F513 supplies devices with
up to 3 Ports (named from A to C) with up to 22 I/
O lines.
Each pin can be used as a digital I/O or can be
connected with a peripheral (Alternate Function).
The I/O lines belonging to Port A and Port B can
also be used to generate Port Interrupts. The I/O
Port pins can be configured in the following modes:
Input high impedance (reset state)
Input with pull-up
Output with pull-up
Output push-pull
Output with weak pull-up
Output open drain
Interrupt with pull-up
Interrupt without pull-up
These
eight
modes
can
be
selected
by
programming three Configuration Registers for
each Port. All the pins that belong to the same Port
can be configured separately by setting the
corresponding bits in the three registers (see
Register Description).
To avoid side effects, the Configuration Registers
are latched only when the Data Direction Register
(PORT_x_DDR) is written. For this reason this
register must be always written when modifying the
pin configuration. All the I/O digital pins are TTL
compatible and have a Schmitt Trigger. The output
buffer can supply high current sink (up to 8mA).
Note: With the aim to reduce current consumption
it is recommended that no floating pins are left; all
unused pins must be kept at fixed voltage.
Furthermore it is recommended that bits of IO
Configuration Registers related to not used or non
available port/pins are set as Input Pull-Up.
Figure 7.1 Digital Pin
7.2 Input Mode
The pins configured as input can be read by
accessing the corresponding Port Input Register
by means of the LDRI instruction. The addresses
for Port A, B and C are respectively 0 (00h), 1
(01h), and 2 (02h).
When executing the LDRI instruction all the signals
connected to the input pins of the Port are read and
the logical value is copied in the specified Register
File location. If some pins are configured in output,
the port buffer contents, which are the last written
logical values in the output pins, are read.
7.3 Output Mode
The pins configured as output can be written by
accessing the corresponding Port Output Register
by means of the LDPR, LDPI and LDPE
instructions. The addresses for Port A, B and C are
respectively, 0 (00h), 1 (01h), and 2 (02h).
When executing the above mentioned instructions,
the Port buffer is written and the Port pin signals
are modified. If some pins are configured as input
or as interrupt, the values are ignored.
7.4 Interrupt Mode
The pins configured as Interrupt Mode can
generate a Port Interrupt request. Only Port A and
Port B pins can be configured in this mode.
An Interrupt vector is associated to each Port:
there are two Port Interrupts available but more
pins of the ports can act as source at the same
time.
The Configuration Registers switch the signals
deriving from interrupt pins to an OR gate that
generates the interrupt request signal. The signal
deriving from the pins can be read, allowing the
discrimination of the interrupt sources when more
than one pin can generate the interrupt signal.
The interrupt trigger can be configured either in the
rising or falling edge of the external signal by using
the INT_POL register
Figure 7.2 Analog Pin
PAD
P ULL UP
EN ABLE
DIGITAL OUT
ENAB LE
DATA
OUT
PORT A ,C,D,E
PIN
DATA
IN
相关PDF资料
PDF描述
ST52E430B/D 8-BIT, UVPROM, 20 MHz, MICROCONTROLLER, CDIP32
ST52F510F1M6 8-BIT, FLASH, 24 MHz, MICROCONTROLLER, PDSO20
ST52F510G0B6 8-BIT, FLASH, 24 MHz, MICROCONTROLLER, PDIP28
ST52F513F0M6 8-BIT, FLASH, 24 MHz, MICROCONTROLLER, PDSO20
ST52F513F1B6 8-BIT, FLASH, 24 MHz, MICROCONTROLLER, PDIP20
相关代理商/技术参数
参数描述
ST52510G2 制造商:未知厂家 制造商全称:未知厂家 功能描述:8-BIT ICU WITH 10-BIT ADC. TWO TIMERS/PWM. I2C. SPI. SCI. UP TO 8K FLASH
ST52510G3 制造商:未知厂家 制造商全称:未知厂家 功能描述:8-BIT ICU WITH 10-BIT ADC. TWO TIMERS/PWM. I2C. SPI. SCI. UP TO 8K FLASH
ST52510K2 制造商:未知厂家 制造商全称:未知厂家 功能描述:8-BIT ICU WITH 10-BIT ADC. TWO TIMERS/PWM. I2C. SPI. SCI. UP TO 8K FLASH
ST52510K3 制造商:未知厂家 制造商全称:未知厂家 功能描述:8-BIT ICU WITH 10-BIT ADC. TWO TIMERS/PWM. I2C. SPI. SCI. UP TO 8K FLASH
ST52510Y2 制造商:未知厂家 制造商全称:未知厂家 功能描述:8-BIT ICU WITH 10-BIT ADC. TWO TIMERS/PWM. I2C. SPI. SCI. UP TO 8K FLASH