| Electronic Components Datasheet Search |
|
PIC16F684-E/P Datasheet(PDF) 42 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F684-E/P Datasheet(HTML) 42 Page - Microchip Technology |
|
42 / 164 page ![]() PIC16F684 DS41202C-page 40 Preliminary 2004 Microchip Technology Inc. 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 A/D converter or compara- tor. For specific information about individual functions such as the Enhanced CCP or the A/D, refer to the appropriate section in this data sheet. EXAMPLE 4-3: INITIALIZING PORTC 4.3.1 RC0/AN4/C2IN+ The RC0 is configurable to function as one of the following: • a general purpose I/O • an analog input for the A/D Converter • an analog input to the comparator 4.3.2 RC1/AN5/C2IN- The RC1 is configurable to function as one of the following: • a general purpose I/O • an analog input for the A/D Converter • an analog input to the comparator FIGURE 4-7: BLOCK DIAGRAM OF RC0 AND RC1 Note: The ANSEL (91h) and CMCON0 (19h) registers must be initialized to configure an analog channel as a digital input. Pins configured as analog inputs will read ‘0’. BCF STATUS,RP0 ;Bank 0 CLRF PORTC ;Init PORTC MOVLW 07h ;Set RC<4,1:0> to MOVWF CMCON0 ;digital I/O BSF STATUS,RP0 ;Bank 1 CLRF ANSEL ;digital I/O MOVLW 0Ch ;Set RC<3:2> as inputs MOVWF TRISC ;and set RC<5:4,1:0> ;as outputs BCF STATUS,RP0 ;Bank 0 I/O PIN VDD VSS D Q CK Q D Q CK Q Data Bus WR PORTC WR TRISC RD TRISC To A/D Converter RD PORTC Analog Input Mode(1) To Comparators Note 1: Analog Input mode comes from ANSEL or Comparator mode. |
|
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 |