| Electronic Components Datasheet Search |
|
OPTION_REG Datasheet(PDF) 109 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
OPTION_REG Datasheet(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 |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |