DatasheetQ Logo
Electronic component search and free download site. Transistors,MosFET ,Diode,Integrated circuits

PIC16LC773T-20/SS View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC16LC773T-20/SS
Microchip
Microchip Technology 
PIC16LC773T-20/SS Datasheet PDF : 202 Pages
First Prev 31 32 33 34 35 36 37 38 39 40 Next Last
PIC16C77X
3.3 PORTC and the TRISC Register
PORTC is an 8-bit wide bi-directional port. The corre-
sponding data direction register is TRISC. Setting a
TRISC bit (=1) will make the corresponding PORTC pin
an input, i.e., put the corresponding output driver in a
hi-impedance mode. Clearing a TRISC bit (=0) will
make the corresponding PORTC pin an output, i.e., put
the contents of the output latch on the selected pin.
PORTC is multiplexed with several peripheral functions
(Table 3-5). PORTC pins have Schmitt Trigger input
buffers.
When enabling peripheral functions, care should be
taken in defining TRIS bits for each PORTC pin. Some
peripherals override the TRIS bit to make a pin an out-
put, while other peripherals override the TRIS bit to
make a pin an input. Since the TRIS bit override is in
effect while the peripheral is enabled, read-mod-
ify-write instructions (BSF, BCF, XORWF) with TRISC
as destination should be avoided. The user should refer
to the corresponding peripheral section for the correct
TRIS bit settings.
EXAMPLE 3-1: INITIALIZING PORTC
BCF STATUS, RP0 ; Select Bank 0
CLRF PORTC
; Initialize PORTC by
; clearing output
; data latches
BSF STATUS, RP0 ; Select Bank 1
MOVLW 0xCF
; Value used to
; initialize data
; direction
MOVWF TRISC
; Set RC<3:0> as inputs
; RC<5:4> as outputs
; RC<7:6> as inputs
FIGURE 3-9:
PORTC BLOCK DIAGRAM
(PERIPHERAL OUTPUT
OVERRIDE)
PORT/PERIPHERAL Select(2)
Peripheral Data Out
0
Data bus
DQ
WR
1
PORT
CK Q
Data Latch
WR
TRIS
DQ
CK Q
TRIS Latch
RD TRIS
Peripheral
OE(3)
Q
VDD
P
I/O
pin(1)
N
VSS
Schmitt
Trigger
D
RD
EN
PORT
Peripheral input
Note 1:
2:
3:
I/O pins have diode protection to VDD and VSS.
Port/Peripheral select signal selects between port
data and peripheral output.
Peripheral OE (output enable) is only activated if
peripheral select is active.
DS30275B-page 32
Advance Information
1999-2013 Microchip Technology Inc.

Share Link: 

datasheetq.com  [ Privacy Policy ]Request Datasheet ] [ Contact Us ]