| Electronic Components Datasheet Search |
|
16F636 Datasheet(PDF) 51 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
16F636 Datasheet(HTML) 51 Page - Microchip Technology |
|
51 / 196 page ![]() © 2005 Microchip Technology Inc. Preliminary DS41232B-page 49 PIC12F635/PIC16F636/639 4.3 PORTC PORTC is a general purpose I/O port consisting of 6 bidirectional pins. The pins can be configured for either digital I/O or analog input to comparator. For specific information about individual functions, refer to the appropriate section in this data sheet. EXAMPLE 4-3: INITIALIZING PORTC 4.3.1 RC0/C2IN+ The RC0 pin is configurable to function as one of the following: • a general purpose I/O • an analog input to the comparator 4.3.2 RC1/C2IN- The RC1 pin is configurable to function as one of the following: • a general purpose I/O • an analog input to the comparator FIGURE 4-7: BLOCK DIAGRAM OF RC0 AND RC1 4.3.3 RC2 The RC2 pin is configurable to function as a general purpose I/O. 4.3.4 RC3 The RC3 pin is configurable to function as a general purpose I/O. 4.3.5 RC5 The RC5 pin is configurable to function as a general purpose I/O. FIGURE 4-8: BLOCK DIAGRAM OF RC2, RC3 AND RC5 Note: The CMCON0 (19h) register must be ini- tialized to configure an analog channel as a digital input. Pins configured as analog inputs will read ‘0’. BCF STATUS,RP0 ;Bank 0 BCF STATUS,RP1 ; CLRF PORTC ;Init PORTC MOVLW 07h ;Set RC<4,1:0> to MOVWF CMCON0 ;digital I/O BSF STATUS,RP0 ;Bank 1 BCF STATUS,RP1 MOVLW 0Ch ;Set RC<3:2> as inputs MOVWF TRISC ;and set RC<5:4,1:0> ;as outputs BCF STATUS,RP0 ;Bank 0 BCF STATUS,RP1 ; I/O pin VDD VSS D Q CK Q D Q CK Q Data Bus WR PORTC WR TRISC RD TRISC RD PORTC Analog Input Mode To Comparators I/O pin VDD VSS D Q CK Q D Q CK Q Data Bus WR PORTC WR TRISC RD TRISC RD PORTC |
|
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 |