| Electronic Components Datasheet Search |
|
PIC16F676-E/ST Datasheet(PDF) 28 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
PIC16F676-E/ST Datasheet(HTML) 28 Page - Microchip Technology |
|
28 / 132 page ![]() PIC16F630/676 DS40039F-page 28 2010 Microchip Technology Inc. 3.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. For specific information about individual functions such as the comparator or the A/D, refer to the appropriate section in this Data Sheet. EXAMPLE 3-2: INITIALIZING PORTC 3.3.1 RC0/AN4, RC1/AN5, RC2/AN6, RC3/ AN7 The RC0/RC1/RC2/RC3 pins are configurable to function as one of the following: • a general purpose I/O • an analog input for the A/D Converter (PIC16F676 only) FIGURE 3-6: BLOCK DIAGRAM OF RC0/RC1/RC2/RC3 PINs 3.3.2 RC4 AND RC5 The RC4 and RC5 pins are configurable to function as a general purpose I/Os. FIGURE 3-7: BLOCK DIAGRAM OF RC4 AND RC5 PINS Note: The ANSEL register (91h) must be clear to configure an analog channel as a digital input. Pins configured as analog inputs will read ‘0’. The ANSEL register is defined for the PIC16F676. BCF STATUS,RP0 ;Bank 0 CLRF PORTC ;Init PORTC 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 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 |