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

PIC16LC76-04E/SS View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC16LC76-04E/SS
Microchip
Microchip Technology 
PIC16LC76-04E/SS Datasheet PDF : 288 Pages
First Prev 41 42 43 44 45 46 47 48 49 50 Next Last
PIC16C7X
5.3 PORTC and TRISC Registers
Applicable Devices
72 73 73A 74 74A 76 77
PORTC is an 8-bit bi-directional port. Each pin is indi-
vidually configurable as an input or output through the
TRISC register. PORTC is multiplexed with several
peripheral functions (Table 5-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-modify-
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 5-3: INITIALIZING PORTC
BCF
BCF
CLRF
BSF
MOVLW
MOVWF
STATUS, RP0
STATUS, RP1
PORTC
STATUS, RP0
0xCF
TRISC
; Select Bank 0
; PIC16C76/77 only
; Initialize PORTC by
; clearing output
; data latches
; Select Bank 1
; Value used to
; initialize data
; direction
; Set RC<3:0> as inputs
; RC<5:4> as outputs
; RC<7:6> as inputs
FIGURE 5-6:
PORTC BLOCK DIAGRAM
(PERIPHERAL OUTPUT
OVERRIDE)
PORT/PERIPHERAL Select(2)
Peripheral Data Out
0
Data bus D Q
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.
TABLE 5-5: PORTC FUNCTIONS
Name
Bit# Buffer Type Function
RC0/T1OSO/T1CKI bit0
ST
Input/output port pin or Timer1 oscillator output/Timer1 clock input
RC1/T1OSI/CCP2(1) bit1
ST
Input/output port pin or Timer1 oscillator input or Capture2 input/
Compare2 output/PWM2 output
RC2/CCP1
bit2
ST
Input/output port pin or Capture1 input/Compare1 output/PWM1
output
RC3/SCK/SCL
bit3
ST
RC3 can also be the synchronous serial clock for both SPI and I2C
modes.
RC4/SDI/SDA
bit4
ST
RC4 can also be the SPI Data In (SPI mode) or data I/O (I2C mode).
RC5/SDO
bit5
ST
Input/output port pin or Synchronous Serial Port data output
RC6/TX/CK(2)
bit6
ST
Input/output port pin or USART Asynchronous Transmit, or USART
Synchronous Clock
RC7/RX/DT(2)
bit7
ST
Input/output port pin or USART Asynchronous Receive, or USART
Synchronous Data
Legend: ST = Schmitt Trigger input
Note 1: The CCP2 multiplexed function is not enabled on the PIC16C72.
2: The TX/CK and RX/DT multiplexed functions are not enabled on the PIC16C72.
DS30390E-page 48
© 1997 Microchip Technology Inc.

Share Link: 

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