PIC16C926 Microchip Technology Inc., PIC16C926 Datasheet - Page 35

no-image

PIC16C926

Manufacturer Part Number
PIC16C926
Description
64/68-pin Cmos Microcontrollers With Lcd Driver
Manufacturer
Microchip Technology Inc.
Datasheet

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
PIC16C926-I/L
Manufacturer:
Microchip Technology
Quantity:
135
Part Number:
PIC16C926-I/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C926-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C926/CL
Manufacturer:
MICROCH
Quantity:
20 000
Part Number:
PIC16C926T-I/L
Manufacturer:
Microchip Technology
Quantity:
10 000
Part Number:
PIC16C926T-I/PT
Manufacturer:
Microchip Technology
Quantity:
10 000
4.3
PORTC is a 6-bit, bi-directional port. Each pin is individ-
ually configurable as an input or output through the
TRISC register. PORTC is multiplexed with several
peripheral functions (Table 4-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
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 4-3:
TABLE 4-5:
TABLE 4-6:
BCF
BCF
CLRF
BSF
MOVLW
MOVWF
Name
RC0/T1OSO/T1CKI
RC1/T1OSI
RC2/CCP1
RC3/SCK/SCL
RC4/SDI/SDA
RC5/SDO
Legend: ST = Schmitt Trigger input
07h
87h
Legend: x = unknown, u = unchanged, - = unimplemented, read as '0'. Shaded cells are not used by PORTC.
Address
2001 Microchip Technology Inc.
while
STATUS,RP0 ; Select Bank0
STATUS,RP1
PORTC
STATUS,RP0 ; Select Bank1
0xCF
TRISC
PORTC and TRISC Register
PORTC
TRISC
Name
the
PORTC FUNCTIONS
SUMMARY OF REGISTERS ASSOCIATED WITH PORTC
peripheral
Bit 7
; Initialize PORTC
; Value used to
; initialize data
; direction
; Set RC<3:0> as inputs
; RC<5:4> as outputs
; RC<7:6> always read 0
INITIALIZING PORTC
Bit#
bit1
bit2
bit3
bit5
bit0
bit4
Buffer Type
Bit 6
is
ST
ST
ST
ST
ST
ST
enabled,
PORTC Data Direction Control Register
Bit 5
RC5
Function
Input/output port pin or Timer1 oscillator output or Timer1 clock input.
Input/output port pin or Timer1 oscillator input.
Input/output port pin or Capture input/Compare output/PWM output.
Input/output port pin or the synchronous serial clock for both SPI and
I
(I
Input/output port pin or Synchronous Serial Port data out.
Input/output port pin or the SPI Data In (SPI mode) or data I/O
2
2
C modes.
read-
Bit 4
C mode).
RC4
Preliminary
Bit 3
RC3
FIGURE 4-5:
Note 1:
Bit 2
RC2
Data Bus
WR Port
WR TRIS
RD TRIS
RD Port
RB0/INT
RBPU
2:
(2)
I/O pins have diode protection to V
To enable weak pull-ups, set the appropriate TRIS
bit(s) and clear the RBPU bit (OPTION<7>).
Bit 1
RC1
PIC16C925/926
TRIS Latch
Data Latch
D
D
CK
CK
Bit 0
RC0
Schmitt Trigger
Buffer
PORTC BLOCK DIAGRAM
(PERIPHERAL OUTPUT
OVERRIDE)
Q
Q
--xx xxxx
--11 1111
Power-on
Value on
Reset
Q
EN
DS39544A-page 33
DD
D
TTL
Input
Buffer
and V
Value on all
--uu uuuu
--11 1111
V
P
RD Port
RESETS
DD
SS
other
Weak
Pull-up
.
I/O
pin
(1)

Related parts for PIC16C926