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

PIC16C64T-04I/SP View Datasheet(PDF) - Microchip Technology

Part Name
Description
Manufacturer
PIC16C64T-04I/SP
Microchip
Microchip Technology 
PIC16C64T-04I/SP Datasheet PDF : 336 Pages
First Prev 51 52 53 54 55 56 57 58 59 60 Next Last
PIC16C6X
5.3 PORTC and TRISC Register
Applicable Devices
61 62 62A R62 63 R63 64 64A R64 65 65A R65 66 67
PORTC is an 8-bit wide bi-directional port. Each pin is
individually 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
;
; PIC16C66/67 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
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 FOR PIC16C62/64
Name
Bit# Buffer Type Function
RC0/T1OSI/T1CKI bit0
RC1/T1OSO
bit1
RC2/CCP1
bit2
RC3/SCK/SCL
bit3
RC4/SDI/SDA
bit4
RC5/SDO
bit5
RC6
bit6
RC7
bit7
ST
Input/output port pin or Timer1 oscillator input or Timer1 clock input
ST
Input/output port pin or Timer1 oscillator output
ST
Input/output port pin or Capture1 input/Compare1 output/PWM1 output
ST
RC3 can also be the synchronous serial clock for both SPI and I2C modes.
ST
RC4 can also be the SPI Data In (SPI mode) or data I/O (I2C mode).
ST
Input/output port pin or synchronous serial port data output
ST
Input/output port pin
ST
Input/output port pin
Legend: ST = Schmitt Trigger input
© 1997 Microchip Technology Inc.
DS30234D-page 55

Share Link: 

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