English
Language : 

PIC16F753 Datasheet, PDF (50/238 Pages) Microchip Technology – 14/16-Pin, Flash-Based 8-Bit CMOS Microcontrollers
PIC16F753/HV753
TABLE 5-2: SUMMARY OF REGISTERS ASSOCIATED WITH PORTA
Name
Bit 7
Bit 6
Bit 5
Bit 4
Bit 3
Bit 2
Bit 1
Bit 0
Register
on Page
ADCON0
ADFM
—
CHS<3:0>
GO/DONE ADON
118
ADCON1
—
ADCS<2:0>
—
—
—
ADPREF1
119
ANSELA
—
—
—
ANSA4
—
ANSA2
ANSA1
ANSA0
48
APFCON
—
—
—
T1GSEL
—
—
—
—
44
CM1CON0
C1ON
C1OUT
C1OE
C1POL C1ZLF
C1SP
C1HYS C1SYNC
139
CM2CON0
C2ON
C2OUT
C2OE
C2POL C2ZLF
C2SP
C2HYS C2SYNC
139
CM1CON1
C1INTP C1INTN
C1PCH<2:0>
C1NCH<2:0>
140
CM2CON1
C2INTP C2INTN
C2PCH<2:0>
C2NCH<2:0>
140
DAC1CON0 DACEN DACFM DACOE
—
DACPSS1 DACPSS0
—
—
130
IOCAF
—
—
IOCAF5 IOCAF4 IOCAF3 IOCAF2 IOCAF1 IOCAF0
49
IOCAN
—
—
IOCAN5 IOCAN4 IOCAN3 IOCAN2 IOCAN1 IOCAN0
49
IOCAP
—
—
IOCAP5 IOCAP4 IOCAP3 IOCAP2 IOCAP1 IOCAP0
49
LATA
—
—
LATA5
LATA4
—
LATA2
LATA1
LATA0
46
OPTION_REG RAPU INTEDG T0CS
T0SE
PSA
PS<2:0>
18
PORTA
—
—
RA5
RA4
RA3
RA2
RA1
RA0
46
SLRCONC
—
TRISA
—
—
SLRC5 SLRC4
—
—
—
—
54
—
TRISA5 TRISA4 TRISA3(1) TRISA2
TRISA1
TRISA0
46
Legend: x = unknown, u = unchanged, – = unimplemented locations read as ‘0’. Shaded cells are not used by PORTA.
Note 1: TRISA3 always reads ‘1’.
5.6 PORTC Registers
PORTC is a 6-bit wide port with five bidirectional and one
input-only pin. The corresponding data direction register
is TRISC (Register 5-2). Setting a TRISC bit (= 1) will
make the corresponding PORTC pin an input (i.e.,
disable the output driver). Clearing a TRISC bit (= 0) will
make the corresponding PORTC pin an output (i.e.,
enables output driver and puts the contents of the output
latch on the selected pin). The exception is RA3, which
is input-only and its TRIS bit will always read as ‘1’.
Example 5-1 shows how to initialize PORTC.
Reading the PORTC register (Register 5-2) reads the
status of the pins, whereas writing to it will write to the
PORT latch. All write operations are read-modify-write
operations. Therefore, a write to a port implies that the
port pins are read, this value is modified and then
written to the PORT data latch. RC3 reads ‘0’ when
MCLRE = 1.
The TRISC register controls the direction of the
PORTC pins, even when they are being used as
analog inputs. The user must ensure the bits in the
TRISC register are maintained set when using them as
analog inputs. I/O pins configured as analog input
always read ‘0’.
Note:
The ANSEL register must be initialized to
configure an analog channel as a digital
input. Pins configured as analog inputs will
read ‘0’ and cannot generate an interrupt.
5.6.1
PORTC FUNCTIONS AND OUTPUT
PRIORITIES
Each PORTC pin is multiplexed with other functions. The
pins, their combined functions and their output priorities
are shown in Table 5-1.
When multiple outputs are enabled, the actual pin
control goes to the peripheral with the highest priority.
Analog input functions, such as comparator inputs, are
not shown in the priority lists. These inputs are active
when the peripheral is enabled and the input multiplexer
for the pin is selected. The Analog mode, set with the
ANSELC register, disables the digital input buffer
thereby preventing excessive input current when the
analog input voltage is between logic states. Digital
output functions may control the pin when it is in Analog
mode with the priority shown in Table 5-1.
DS40001709A-page 50
Preliminary
 2013 Microchip Technology Inc.