| 数据搜索系统,热门电子元器件搜索 |
|
ST72251 数据表(PDF) 2 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
ST72251 数据表(HTML) 2 Page - STMicroelectronics |
|
2 / 10 page ![]() ST72251 CONFIGURATION 2/10 2 ST72251 CONFIGURATION The application has been validated with a ST72251. Its configuration is described in this part. Refer to your datasheet for more details. 2.1 I/O CONTROL Rows are connected to pins configured as inputs (Port C as input with pull up and interrupts). Columns are connected to pins configured as outputs (Port A). External interrupts are caused by a low level applied to a pin of Port C (caused by a key pressed), they wake up the MCU which was in HALT mode. Port B is configured as outputs to send the value of the pressed key on LEDS. Please, refer to the Data Book to configure pins properly. 2.2 MISCELLANEOUS REGISTER Bits 7 and 6 have to be set to configure events correctly: the external interrupt (EI1) has here to be caused by a falling edge only. Please, refer to the datasheet for more details. 2.3 HALT MODE The HALT instruction places the ST72251 in its lowest power consumption mode. The core and all peripherals are frozen. In this mode, the internal oscillator is turned off, causing all in- ternal processing to be halted. The data remain unchanged. During the HALT mode, external interrupts are still enabled. The MCU stays in this state until an external interrupt or a reset oc- curs. Then the internal oscillator is restarted and the core waits for 4096 CPU clock cycles (512 µs for a fCPU = 8MHz) before running the external interrupt subroutine. Then the MCU comes back to the main program (in our application to the HALT state). Please, refer to the datasheet for more details. 3 EXTERNAL INTERRUPTS The MCU is in HALT mode. When a key is pressed, a low level is applied to the pin corre- sponding to the row the key belongs (pins configured as inputs with pull-up). It’s a falling edge applied to a pin of Port C which creates an external interrupt (EI1) and wakes up the MCU. The MCU executes then the external interrupt subroutine (decoding the pressed key) and comes back to its previous state (HALT state in the main program). |
|
|
链接网址 |
| 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 |