| 数据搜索系统,热门电子元器件搜索 |
|
ST7263 数据表(PDF) 25 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST7263 数据表(HTML) 25 Page - STMicroelectronics |
|
25 / 109 page ![]() ST7263 25/109 5 ON-CHIP PERIPHERALS 5.1 I/O PORTS 5.1.1 Introduction The I/O ports offer different functional modes: – transfer of data through digital inputs and outputs and for specific pins: – analog signal input (ADC) – alternate signal input/output for the on-chip pe- ripherals. – external interrupt generation An I/O port is composed of up to 8 pins. Each pin can be programmed independently as digital input (with or without interrupt generation) or digital out- put. 5.1.2 Functional description Each port is associated to 2 main registers: – Data Register (DR) – Data Direction Register (DDR) Each I/O pin may be programmed using the corre- sponding register bits in DDR register: bit X corre- sponding to pin X of the port. The same corre- spondence is used for the DR register. Table 8. I/O Pin Functions 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. Note 1: All the inputs are triggered by a Schmitt trigger. Note 2: When switching from input mode to output mode, the DR register should be written first to output the correct value as soon as the port is con- figured as an output. Interrupt function When an I/O is configured in Input with Interrupt, an event on this I/O can generate an external In- terrupt request to the CPU. The interrupt sensitivi- ty is given independently according to the descrip- tion mentioned in the ITRFRE interrupt register. Each pin can independently generate an Interrupt request. Each external interrupt vector is linked to a dedi- cated group of I/O port pins (see Interrupts sec- tion). If more than one input pin is selected simul- taneously as interrupt source, this is logically ORed. For this reason if one of the interrupt pins is tied low, it masks the other ones. Output Mode The pin is configured in output mode by setting the corresponding DDR register bit (see Table 7). In this mode, writing “0” or “1” to the DR register applies this digital value to the I/O pin through the latch. Then reading the DR register returns the previously stored value. Note: In this mode, the interrupt function is disa- bled. Digital Alternate Function When an on-chip peripheral is configured to use a pin, the alternate function is automatically select- ed. This alternate function takes priority over standard I/O programming. When the signal is coming from an on-chip peripheral, the I/O pin is automatically configured in output mode (push-pull or open drain according to the peripheral). When the signal is going to an on-chip peripheral, the I/O pin has to be configured in input mode. In this case, the pin’s state is also digitally readable by addressing the DR register. Notes: 1. Input pull-up configuration can cause an unex- pected value at the input of the alternate peripher- al input. 2. When the on-chip peripheral uses a pin as input and output, this pin must be configured as an input (DDR = 0). Warning: The alternate function must not be acti- vated as long as the pin is configured as input with interrupt, in order to avoid generating spurious in- terrupts. DDR MODE 0 Input 1 Output |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |