PIC18C252/JW Microchip Technology, PIC18C252/JW Datasheet - Page 82
PIC18C252/JW
Manufacturer Part Number
PIC18C252/JW
Description
IC MCU 16x16 A/D 28CDIP
Manufacturer
Microchip Technology
Series
PIC® 18Cr
Datasheets
1.PIC16F616T-ISL.pdf
(8 pages)
2.PIC16C770-ISO.pdf
(8 pages)
3.PIC18C242-ISO.pdf
(305 pages)
4.PIC18C242-ISO.pdf
(12 pages)
Specifications of PIC18C252/JW
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
32KB (16K x 16)
Program Memory Type
EPROM, UV
Ram Size
1.5K x 8
Voltage - Supply (vcc/vdd)
4.2 V ~ 5.5 V
Data Converters
A/D 5x10b
Oscillator Type
External
Operating Temperature
0°C ~ 70°C
Package / Case
28-CDIP (0.300", 7.62mm) Window
For Use With
XLT28XP - SOCKET TRANSITION ICE 28DIP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
Company:
Part Number:
PIC18C252/JW
Manufacturer:
MICROCHIP
Quantity:
4 000
- PIC16F616T-ISL PDF datasheet
- PIC16C770-ISO PDF datasheet #2
- PIC18C242-ISO PDF datasheet #3
- PIC18C242-ISO PDF datasheet #4
- Current page: 82 of 305
- Download datasheet (6Mb)
PIC18CXX2
8.2
PORTB is an 8-bit wide, bi-directional port. The corre-
sponding data direction register is TRISB. Setting a
TRISB bit (= 1) will make the corresponding PORTB pin
an input (i.e., put the corresponding output driver in a
Hi-Impedance mode). Clearing a TRISB bit (= 0) will
make the corresponding PORTB pin an output (i.e., put
the contents of the output latch on the selected pin).
The Data Latch register (LATB) is also memory
mapped. Read-modify-write operations on the LATB
register reads and writes the latched output value for
PORTB.
EXAMPLE 8-2:
Each of the PORTB pins has a weak internal pull-up. A
single control bit can turn on all the pull-ups. This is per-
formed by clearing bit RBPU (INTCON2<7>). The
weak pull-up is automatically turned off when the port
pin is configured as an output. The pull-ups are dis-
abled on a Power-on Reset.
Four of the PORTB pins, RB7:RB4, have an interrupt-
on-change feature. Only pins configured as inputs can
cause this interrupt to occur (i.e., any RB7:RB4 pin
configured as an output is excluded from the interrupt-
on-change comparison). The input pins (of RB7:RB4)
are compared with the old value latched on the last
read of PORTB. The “mismatch” outputs of RB7:RB4
are OR’ed together to generate the RB Port Change
Interrupt with flag bit RBIF (INTCON<0>).
This interrupt can wake the device from SLEEP. The
user, in the Interrupt Service Routine, can clear the
interrupt in the following manner:
a)
b)
DS39026C-page 80
CLRF
CLRF
MOVLW 0xCF
MOVWF TRISB
Note:
Any read or write of PORTB (except with the
MOVFF instruction). This will end the mismatch
condition.
Clear flag bit RBIF.
PORTB, TRISB and LATB
Registers
PORTB
LATB
On a Power-on Reset, these pins are con-
figured as digital inputs.
; Initialize PORTB by
; clearing output
; data latches
; Alternate method
; to clear output
; data latches
; Value used to
; initialize data
; direction
; Set RB<3:0> as inputs
; RB<5:4> as outputs
; RB<7:6> as inputs
INITIALIZING PORTB
A mismatch condition will continue to set flag bit RBIF.
Reading PORTB will end the mismatch condition and
allow flag bit RBIF to be cleared.
The interrupt-on-change feature is recommended for
wake-up on key depression operation and operations
where PORTB is only used for the interrupt-on-change
feature. Polling of PORTB is not recommended while
using the interrupt-on-change feature.
RB3 can be configured by the configuration bit
CCP2MX as the alternate peripheral pin for the CCP2
module (CCP2MX = ‘0’).
FIGURE 8-4:
Data Bus
WR TRISB
Set RBIF
Note 1: I/O pins have diode protection to V
WR LATB
or
PORTB
RBPU
RBx/INTx
From other
RB7:RB4 pins
2: To enable weak pull-ups, set the appropriate TRIS
(2)
bit(s) and clear the RBPU bit (INTCON2<7>).
RD TRISB
RD LATB
RD PORTB
TRIS Latch
Data Latch
D
D
CK
CK
Q
Q
BLOCK DIAGRAM OF
RB7:RB4 PINS
2001 Microchip Technology Inc.
Q
Q
Latch
EN
EN
D
D
DD
TTL
Input
Buffer
and V
RD PORTB
V
P
DD
SS
Weak
Pull-up
Buffer
I/O
pin
.
Q1
Q3
(1)
ST
Related parts for PIC18C252/JW
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
IC, 8BIT MCU, PIC18F, 40MHZ, LCC-44
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC18LF, 40MHZ, PLCC-64
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC18F, 64MHZ, TQFP-80
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
MCU, MPU & DSP Development Tools CAN/LIN PICtail Plus Daughter Board
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC18F, 64MHZ, DIP-40
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC18LF, 40MHZ, PLCC-64
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
IC, 8BIT MCU, PIC18F, 64MHZ, TQFP-64
Manufacturer:
Microchip Technology
Part Number:
Description:
IC, 8BIT MCU, PIC18F, 64MHZ, TQFP-80
Manufacturer:
Microchip Technology
Part Number:
Description:
8KB, Flash, 768bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 UQFN 5x5x0.5mm TUB
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
8KB, Flash, 768bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 UQFN 5x5x0.5mm TUB
Manufacturer:
Microchip Technology
Part Number:
Description:
16KB, Flash, 768bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 UQFN 5x5x0.5mm TU
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
16KB, Flash, 768bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 UQFN 5x5x0.5mm TU
Manufacturer:
Microchip Technology
Part Number:
Description:
32KB, Flash, 1536bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 UQFN 5x5x0.5mm T
Manufacturer:
Microchip Technology
Datasheet:
Part Number:
Description:
32KB, Flash, 1536bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 UQFN 5x5x0.5mm T
Manufacturer:
Microchip Technology
Part Number:
Description:
64KB, Flash, 3968bytes-RAM, 36I/O, 8-bit Family,nanowatt XLP 40 UQFN 5x5x0.5mm T
Manufacturer:
Microchip Technology
Datasheet: