PIC18LF2539T-I/SO Microchip Technology, PIC18LF2539T-I/SO Datasheet - Page 91

IC MCU FLASH 12KX16 EE AD 28SOIC

PIC18LF2539T-I/SO

Manufacturer Part Number
PIC18LF2539T-I/SO
Description
IC MCU FLASH 12KX16 EE AD 28SOIC
Manufacturer
Microchip Technology
Series
PIC® 18Fr

Specifications of PIC18LF2539T-I/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
21
Program Memory Size
24KB (12K x 16)
Program Memory Type
FLASH
Eeprom Size
256 x 8
Ram Size
1408 x 8
Voltage - Supply (vcc/vdd)
2 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 85°C
Package / Case
28-SOIC (7.5mm Width)
Processor Series
PIC18LF
Core
PIC
Data Bus Width
8 bit
Data Ram Size
1408 B
Interface Type
I2C, SPI, AUSART
Maximum Clock Frequency
40 MHz
Number Of Programmable I/os
21
Number Of Timers
16 bit
Operating Supply Voltage
2 V to 5.5 V
Maximum Operating Temperature
+ 85 C
Mounting Style
SMD/SMT
3rd Party Development Tools
52715-96, 52716-328, 52717-734, 52712-325, EWPIC18
Development Tools By Supplier
DV164005, DV164136
Minimum Operating Temperature
- 40 C
On-chip Adc
5 bit
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
9.3
PORTC is a 6-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 High 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 the serial communication
functions (Table 9-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 corre-
sponding peripheral section for the correct TRIS bit
settings.
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.
FIGURE 9-7:
 2002 Microchip Technology Inc.
Note:
Note 1:
PORTC, TRISC and LATC
Registers
On a Power-on Reset, these pins are
configured as digital inputs.
2:
3:
I/O pins have diode protection to V
Port/Peripheral Select signal selects between port data (input) and peripheral output.
Peripheral Output Enable is only active if Peripheral Select is active.
PORTC BLOCK DIAGRAM (PERIPHERAL OUTPUT OVERRIDE)
RD LATC
RD TRISC
Peripheral Output
RD PORTC
Peripheral Data Out
WR LATC or
WR PORTC
WR TRISC
Enable
Port/Peripheral Select
Data Bus
Peripheral Data In
(3)
DD
and V
(2)
TRIS Latch
Data Latch
CK
CK
D
D
SS
Preliminary
.
Q
Q
Q
Q
EXAMPLE 9-3:
PIC18FXX39 devices differ from other PIC18 micro-
controllers in allocation of PORTC pins. For most
PIC18 devices, PORTC is an 8-bit-wide port. For the
PIC18FXX39 family, two of the PORTC pins (RC1 and
RC2) are re-allocated as PWM output only pins for use
with the Motor Control kernel. To maintain pinout com-
patibility with other PICmicro
PORTC pins are assigned in a manner consistent with
other PIC18 devices. For this reason, PORTC has pins
RC0 and RC3 through RC7, but not RC1 and RC2.
To maintain compatibility with PIC18FXX2 devices, the
individual port and corresponding latch and direction
bits for RC1 and RC2 are present in the appropriate
registers, but are not available to the user. To avoid
erratic device operation, the values of these bits should
not be modified.
CLRF
CLRF
MOVLW 0xC9
MOVWF TRISC
0
1
Q
EN
D
PORTC
LATC
V
V
P
N
DD
SS
; Initialize PORTC by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
; Value used to
; initialize data
; direction
; Set RC<3>,RC<0> as inputs,
; RC<5:4> as outputs, and
; RC<7:6> as inputs
PIC18FXX39
INITIALIZING PORTC
I/O pin
Schmitt
Trigger
®
(1)
devices, the remaining
DS30485A-page 89

Related parts for PIC18LF2539T-I/SO