English
Language : 

PIC16F526 Datasheet, PDF (29/122 Pages) Microchip Technology – 14-Pin, 8-Bit Flash Microcontroller
6.4 I/O Interfacing
The equivalent circuit for an I/O port pin is shown in
Figure 6-1. All port pins, except RB3 which is input-
only, may be used for both input and output operations.
For input operations, these ports are non-latching. Any
input must be present until read by an input instruction
(e.g., MOVF PORTB, W). The outputs are latched and
remain unchanged until the output latch is rewritten. To
use a port pin as output, the corresponding direction
control bit in TRIS must be cleared (= 0). For use as an
input, the corresponding TRIS bit must be set. Any I/O
pin (except RB3) can be programmed individually as
input or output.
PIC16F526
FIGURE 6-1:
GPPU
RBPU
BLOCK DIAGRAM OF RB0
AND RB1 (with Weak Pull-
up and Wake-up on
Change)
Data
Bus
WR
Port
D
Q
Data
Latch
CK
Q
W
Reg
TRIS ‘f’
D
Q
TRIS
Latch
CK
Q
Reset
ADC pin Ebl
COMP pin Ebl
I/O Pin(1)
RD Port
Q
D
CK
Pin Change
ADC
COMP
Note 1: I/O pins have protection diodes to VDD and
VSS.
 2010 Microchip Technology Inc.
DS41326D-page 29