| 数据搜索系统,热门电子元器件搜索 |
|
OPTION_REG 数据表(PDF) 109 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
OPTION_REG 数据表(HTML) 109 Page - Microchip Technology |
|
109 / 222 page ![]() 2013 Microchip Technology Inc. DS22331A-page 109 MCP19111 19.0 I/O PORTS In general, when a peripheral is enabled, that pin may not be used as a general purpose I/O pin. Each port has two registers for its operation. These registers are: • TRISx registers (data direction register) • PORTGPx registers (reads the levels on the pins of the device) Some ports may have one or more of the following additional registers. These registers are: • ANSELx (analog select) • WPUx (weak pull-up) Ports with analog functions also have an ANSELx register, which can disable the digital input and save power. A simplified model of a generic I/O port, without the interfaces to other peripherals, is shown in Figure 19-1. FIGURE 19-1: GENERIC I/O PORTGPX OPERATION EXAMPLE 19-1: INITIALIZING PORTA Q D CK Write LATx Data Register I/O pin Read PORTx Write PORTx TRISx Read LATx Data Bus To peripherals ANSELx VDD VSS ; This code example illustrates ; initializing the PORTGPA register. The ; other ports are initialized in the same ; manner. BANKSEL PORTGPA; CLRF PORTGPA;Init PORTA BANKSEL ANSELA; CLRF ANSELA;digital I/O BANKSEL TRISGPA; MOVLW B'00011111';Set GPA<4:0> as ;inputs MOVWF TRISGPA;and set GPA<7:6> as ;outputs |
|
链接网址 |
| 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 |