PIC16C782-E/SS Microchip Technology, PIC16C782-E/SS Datasheet - Page 37
![IC PIC MCU FLASH 8BIT 2K 20SSOP](/photos/6/58/65895/150-20-ssop_sml.jpg)
PIC16C782-E/SS
Manufacturer Part Number
PIC16C782-E/SS
Description
IC PIC MCU FLASH 8BIT 2K 20SSOP
Manufacturer
Microchip Technology
Series
PIC® 16Cr
Datasheets
1.PIC16C781-ISO.pdf
(186 pages)
2.PIC16C781-ISO.pdf
(8 pages)
3.PIC16C781-ISO.pdf
(8 pages)
Specifications of PIC16C782-E/SS
Core Processor
PIC
Core Size
8-Bit
Speed
20MHz
Peripherals
Brown-out Detect/Reset, POR, PWM, WDT
Number Of I /o
13
Program Memory Size
3.5KB (2K x 14)
Program Memory Type
OTP
Ram Size
128 x 8
Voltage - Supply (vcc/vdd)
4 V ~ 5.5 V
Data Converters
A/D 8x8b; D/A 1x8b
Oscillator Type
Internal
Operating Temperature
-40°C ~ 125°C
Package / Case
20-SSOP
For Use With
XLT20SS1-1 - SOCKET TRANSITION 20DIP 20SSOP
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Eeprom Size
-
Connectivity
-
- Current page: 37 of 186
- Download datasheet (4Mb)
3.3
PORTB is an 8-bit wide, bi-directional port. The corre-
sponding data direction register is TRISB. Setting a
TRISB bit (= 1) makes the corresponding PORTB pin
an input (i.e., puts the corresponding output driver into
a Hi-Impedance mode). Clearing a TRISB bit (= 0)
makes the corresponding PORTB pin an output (i.e.,
puts the contents of the output latch on the selected
pin.
EXAMPLE 3-2:
;* This code block will configure PORT B
;* as follows
;*
;*
;*
;*
;*
The RB0 pin can be configured as:
• Digital I/O
• ADC/Comparator Analog Input (AN4)
• External Interrupt (INT)
• Voltage Reference Output (V
When the pin is used as an analog I/O, the ANSEL reg-
ister must have bit 4 set to configure the RB0 pin as an
analog input.
Pin RB1 is multiplexed with two analog functions: ADC/
Comparator Analog Input AN5, and the output of the
DAC. When the pin is used as an analog I/O, the
ANSEL register must have bit 5 set to configure the
RB1 pin as an analog I/O.
2001 Microchip Technology Inc.
RB<7:6> analog inputs
RB<5:4> digital inputs
RB<3:2> digital inputs
RB<1:0> digital inputs
RA<3:0> digital I/O
BANKSEL
CLRF
BANKSEL
MOVLW
MOVWF
MOVLW
MOVWF
PORTB and the TRISB Register
PORTB
PORTB
TRISB
B’11001111’ ; Digital I/O
TRISB
B’00000011’ ; Analog I/O config
ANSEL
INITIALIZING PORTB
R
; Select Bank 0
; Preset PORTB data
; reg.
; Select Bank 1
;
; Configure PORTB
; digital
; data
; Configure PORTB
; analog
)
config data
Preliminary
Pin RB2 is multiplexed with the analog function ADC/
Comparator Input AN6. When the pin is used as an
analog input, the ANSEL register must have bit 6 to
select the Analog mode for the pin.
The RB3 pin is multiplexed with two analog functions:
ADC/Comparator Analog Input AN7, and the output of
the OPA module. When the pin is used as analog I/O,
the ANSEL register must have bit 7 set to select the
Analog mode of the pin.
Pins RB<7:6> are multiplexed with the outputs of the
two on-board comparators, the outputs of the PSMC
module, and the clock gate input for Timer1. Note,
when enabled, these peripherals override the PORTB
data register; however, TRISB retains control of output
drivers. Therefore, TRISB<7:6> must be programmed
appropriately for Comparator and PSMC outputs to
operate.
3.3.1
Each of the PORTB pins has an internal weak pull-up
resistance, which can be individually enabled from the
WPUB register. A single global enable bit, RBPU
(OPTION_REG<7>), can turn on/off all of the selected
pull-ups. Clearing the RBPU bit (OPTION_REG<7>)
enables the weak pull-up resistors (see Register 3-2).
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.
3.3.2
Each of the PORTB pins, if configured as input, has the
ability to generate an interrupt-on-change. To enable
the interrupt-on-change feature, the corresponding bit
must be set in the IOCB register (see Register 3-3).
The RBIE bit in the INTCON register functions as a glo-
bal enable bit to turn on/off the interrupt-on-change fea-
ture. The selected inputs are compared to the old value
latched on the last read of PORTB. The ”mismatch”
outputs are OR-ed together to generate the RB Port
Change Interrupt with flag bit RBIF (INTCON<0>).
The IOCB interrupt can also awaken the device from
SLEEP. The user, in the Interrupt Service Routine,
must clear the interrupt in the following manner:
a)
b)
A read or write to PORTB. This copies the cur-
rent state into the latch and ends the mismatch
condition.
Clear flag bit RBIF.
PORTB WEAK PULL-UP
PORTB INTERRUPT-ON-CHANGE
PIC16C781/782
DS41171A-page 35
Related parts for PIC16C782-E/SS
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
![PIC16C782-I/P](/photos/12/13/121303/150-20-dip_tmb.jpg)
Part Number:
Description:
IC MCU CMOS 8BIT 2K 20MHZ 20-DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C782-E/P](/photos/12/13/121303/150-20-dip_tmb.jpg)
Part Number:
Description:
IC PIC MCU FLASH 8BIT 2K 20DIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C782-I/SS](/photos/6/58/65895/150-20-ssop_tmb.jpg)
Part Number:
Description:
IC MCU CMOS 8BIT 2K 20MHZ 20SSOP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C782-E/SO](/photos/6/64/66480/150-20-soic_tmb.jpg)
Part Number:
Description:
IC PIC MCU FLASH 8BIT 2K 20SOIC
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C782/JW](/photos/12/13/121360/150-20-cdip_tmb.jpg)
Part Number:
Description:
IC MCU EPROM 2KX14 COMP 20CDIP
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C782-I/SO](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
3.5 KB OTP, 128 RAM, 16 I/O 20 SOIC .300in TUBE
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C782](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
8-bit Cmos Microcontrollers With A/d, D/a, Opamp, Comparators And Psmc
Manufacturer:
Microchip Technology Inc.
Datasheet:
![AC163004](/photos/26/90/269054/ac163004_tmb.jpg)
Part Number:
Description:
BOARD DEMO FLOW RATE SENSOR MSC1
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C54-HS/P](/images/manufacturer_photos/0/4/439/microchip_technology_tmb.jpg)
Part Number:
Description:
IC, 8BIT MCU, PIC16C, 40MHZ, DIP-18
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C55-RC/P](/photos/7/29/72985/150-28-dip_wide_tmb.jpg)
Part Number:
Description:
IC, 8BIT MCU, PIC16C, 4MHZ, DIP-28
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C55-XT/P](/photos/7/29/72985/150-28-dip_wide_tmb.jpg)
Part Number:
Description:
IC, 8BIT MCU, PIC16C, 4MHZ, DIP-28
Manufacturer:
Microchip Technology
Datasheet:
![PIC16C74A-04/P](/photos/6/61/66192/150-40-dip_tmb.jpg)
Part Number:
Description:
IC, 8BIT MCU, PIC16C, 4MHZ, DIP-40
Manufacturer:
Microchip Technology
Datasheet:
![TC1014-2.7VCT](/images/manufacturer_photos/0/4/440/microchip_technology_inc__tmb.jpg)
Part Number:
Description:
Manufacturer:
Microchip Technology Inc.
Datasheet: