PIC18C242-E/SO Microchip Technology, PIC18C242-E/SO Datasheet - Page 85

IC MCU OTP 8KX16 A/D 28SOIC

PIC18C242-E/SO

Manufacturer Part Number
PIC18C242-E/SO
Description
IC MCU OTP 8KX16 A/D 28SOIC
Manufacturer
Microchip Technology
Series
PIC® 18Cr

Specifications of PIC18C242-E/SO

Core Processor
PIC
Core Size
8-Bit
Speed
40MHz
Connectivity
I²C, SPI, UART/USART
Peripherals
Brown-out Detect/Reset, LVD, POR, PWM, WDT
Number Of I /o
22
Program Memory Size
16KB (8K x 16)
Program Memory Type
OTP
Ram Size
512 x 8
Voltage - Supply (vcc/vdd)
4.2 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
External
Operating Temperature
-40°C ~ 125°C
Package / Case
28-SOIC (7.5mm Width)
Processor Series
PIC18C
Core
PIC
Data Bus Width
8 bit
Data Ram Size
512 B
Interface Type
MSSP, SPI, I2C, USART
Maximum Clock Frequency
40 MHz
Number Of Programmable I/os
23
Number Of Timers
1 x 16 bit
Operating Supply Voltage
2.5 V to 5.5 V
Maximum Operating Temperature
+ 125 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
ICE2000, DM163022, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
5 bit
For Use With
I3DB18C452 - BOARD DAUGHTER ICEPIC3
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Lead Free Status / Rohs Status
 Details
Other names
PIC18C242E/SO
8.3
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).
The Data Latch register (LATC) is also memory
mapped. Read-modify-write operations on the LATC
register reads and writes the latched output value for
PORTC.
PORTC is multiplexed with several peripheral functions
(Table 8-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. The user should refer to the correspond-
ing peripheral section for the correct TRIS bit settings.
FIGURE 8-7:
Note:
2001 Microchip Technology Inc.
Note 1: I/O pins have diode protection to V
PORTC, TRISC and LATC
Registers
On a Power-on Reset, these pins are con-
figured as digital inputs.
2: Port/Peripheral select signal selects between port data (input) and peripheral output.
3: Peripheral Output Enable is only active if peripheral select is active.
PORTC BLOCK DIAGRAM (PERIPHERAL OUTPUT OVERRIDE)
RD LATC
RD TRISC
Peripheral Output
Enable
RD PORTC
Peripheral Data Out
WR LATC or
WR PORTC
WR TRISC
Peripheral Data In
Port/Peripheral Select
Data Bus
(3)
DD
and V
(2)
DDR Latch
Data Latch
CK
CK
D
D
SS
.
Q
Q
Q
Q
The pin override value is not loaded into the TRIS reg-
ister. This allows read-modify-write of the TRIS register,
without concern due to peripheral overrides.
RC1 is normally configured by the configuration bit
CCP2MX as the default peripheral pin for the CCP2
module (default/erased state, CCP2MX = ‘1’).
EXAMPLE 8-3:
CLRF
CLRF
MOVLW 0xCF
MOVWF TRISC
0
1
Q
EN
D
PORTC
LATC
V
V
P
N
; Initialize PORTC by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
; Value used to
; initialize data
; direction
; Set RC<3:0> as inputs
; RC<5:4> as outputs
; RC<7:6> as inputs
DD
SS
INITIALIZING PORTC
PIC18CXX2
Schmitt
Trigger
I/O pin
(1)
DS39026C-page 83

Related parts for PIC18C242-E/SO