参数资料
型号: ST72F652AR4T1
厂商: STMICROELECTRONICS
元件分类: 微控制器/微处理器
英文描述: 8-BIT, FLASH, 12 MHz, MICROCONTROLLER, PQFP64
封装: 10 X 10 MM, TQFP-64
文件页数: 102/160页
文件大小: 979K
代理商: ST72F652AR4T1
ST7265x
46/160
9 I/O PORTS
9.1 INTRODUCTION
The I/O ports offer different functional modes:
– transfer of data through digital inputs and outputs
and for specific pins:
– external interrupt generation
– alternate signal input/output for the on-chip pe-
ripherals.
An I/O port contains up to 8 pins. Each pin can be
programmed independently as digital input (with or
without interrupt generation) or digital output.
9.2 FUNCTIONAL DESCRIPTION
Each port has 2 main registers:
– Data Register (DR)
– Data Direction Register (DDR)
and one optional register:
– Option Register (OR)
Each I/O pin may be programmed using the corre-
sponding register bits in the DDR and OR regis-
ters: bit X corresponding to pin X of the port. The
same correspondence is used for the DR register.
The following description takes into account the
OR register, (for specific ports which do not pro-
vide this register refer to the I/O Port Implementa-
tion section). The generic I/O block diagram is
shown in Figure 33
9.2.1 Input Modes
The input configuration is selected by clearing the
corresponding DDR register bit.
In this case, reading the DR register returns the
digital value applied to the external I/O pin.
Different input modes can be selected by software
through the OR register.
Notes:
1. Writing the DR register modifies the latch value
but does not affect the pin status.
2. When switching from input to output mode, the
DR register has to be written first to drive the cor-
rect level on the pin as soon as the port is config-
ured as an output.
External interrupt function
When an I/O is configured as Input with Interrupt,
an event on this I/O can generate an external inter-
rupt request to the CPU.
Each pin can independently generate an interrupt
request. The interrupt sensitivity is independently
programmable using the sensitivity bits in the Mis-
cellaneous register.
Each external interrupt vector is linked to a dedi-
cated group of I/O port pins (see pinout description
and interrupt section). If several input pins are se-
lected simultaneously as interrupt source, these
are logically NANDed and inverted. For this rea-
son if one of the interrupt pins is tied low, it masks
the other ones.
In case of a floating input with interrupt configura-
tion, special care must be taken when changing
the configuration (see Figure 34).
The external interrupts are hardware interrupts,
which means that the request latch (not accessible
directly by the application) is automatically cleared
when
the
corresponding
interrupt
vector
is
fetched. To clear an unwanted pending interrupt
by software, the sensitivity bits in the Miscellane-
ous register must be modified.
9.2.2 Output Modes
Two different output modes can be selected by
software through the OR register: Output push-pull
and open-drain.
DR register value and output pin status:
The output configuration is selected by setting the
corresponding DDR register bit. In this case, writ-
ing the DR register applies this digital value to the
I/O pin through the latch. Reading the DR register
returns the digital value present on the external I/O
pin. Consequently even in output mode a value
written to an open drain port may differ from the
value read from the port. For example, if software
writes a ‘1’ in the latch, this value will be applied to
the pin, but the pin may stay at ‘0’ depending on
the state of the external circuitry. For this reason,
bit manipulation even using instructions like BRES
and BSET must not be used on open drain ports
as they work by reading a byte, changing a bit and
writing back a byte. A workaround for applications
requiring bit manipulation on Open Drain I/Os is
given in the note below Table 13.
9.2.3 Alternate Functions
When an on-chip peripheral is configured to use a
pin, the alternate function is automatically select-
ed. This alternate function takes priority over the
standard I/O programming.
DR
Push-pu ll
Open-drain
0VSS
Vss
1VDD
Floating
1
相关PDF资料
PDF描述
ST72P651AR6T1/XXX 8-BIT, MROM, 12 MHz, MICROCONTROLLER, PQFP64
ST72T121J4B3S 8-BIT, OTPROM, 4 MHz, MICROCONTROLLER, PDIP42
ST72T121J4B6S 8-BIT, OTPROM, 8 MHz, MICROCONTROLLER, PDIP42
ST72E121J4D0 8-BIT, UVPROM, 8 MHz, MICROCONTROLLER, CDIP42
ST72T121J4T6 8-BIT, OTPROM, 8 MHz, MICROCONTROLLER, PQFP44
相关代理商/技术参数
参数描述
ST72P262M6/OZXTR 制造商:STMicroelectronics 功能描述:ST72P262M6/OZXTR
ST72P324TA/OBZTR 制造商:STMicroelectronics 功能描述:
ST72P324TA/OHXTR 制造商:STMicroelectronics 功能描述:
ST72P4T128M-A05AU 制造商:STEC Inc 功能描述:1GB,ECC,REG,DDR2-400,UNLEAD - Bulk
ST72T101G1B6 功能描述:8位微控制器 -MCU OTP EPROM 4K SPI RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT