参数资料
型号: PIC16C782-I/SO
厂商: Microchip Technology
文件页数: 118/186页
文件大小: 0K
描述: IC MCU CMOS 8BIT 2K 20MHZ 20SOIC
产品培训模块: Asynchronous Stimulus
标准包装: 38
系列: PIC® 16C
核心处理器: PIC
芯体尺寸: 8-位
速度: 20MHz
外围设备: 欠压检测/复位,POR,PWM,WDT
输入/输出数: 13
程序存储器容量: 3.5KB(2K x 14)
程序存储器类型: OTP
RAM 容量: 128 x 8
电压 - 电源 (Vcc/Vdd): 4 V ~ 5.5 V
数据转换器: A/D 8x8b; D/A 1x8b
振荡器型: 内部
工作温度: -40°C ~ 85°C
封装/外壳: 20-SOIC(0.295",7.50mm 宽)
包装: 管件
配用: AC164028-ND - MODULE SKT PROMATEII 20SOIC/DIP
其它名称: PIC16C782I/SO
第1页第2页第3页第4页第5页第6页第7页第8页第9页第10页第11页第12页第13页第14页第15页第16页第17页第18页第19页第20页第21页第22页第23页第24页第25页第26页第27页第28页第29页第30页第31页第32页第33页第34页第35页第36页第37页第38页第39页第40页第41页第42页第43页第44页第45页第46页第47页第48页第49页第50页第51页第52页第53页第54页第55页第56页第57页第58页第59页第60页第61页第62页第63页第64页第65页第66页第67页第68页第69页第70页第71页第72页第73页第74页第75页第76页第77页第78页第79页第80页第81页第82页第83页第84页第85页第86页第87页第88页第89页第90页第91页第92页第93页第94页第95页第96页第97页第98页第99页第100页第101页第102页第103页第104页第105页第106页第107页第108页第109页第110页第111页第112页第113页第114页第115页第116页第117页当前第118页第119页第120页第121页第122页第123页第124页第125页第126页第127页第128页第129页第130页第131页第132页第133页第134页第135页第136页第137页第138页第139页第140页第141页第142页第143页第144页第145页第146页第147页第148页第149页第150页第151页第152页第153页第154页第155页第156页第157页第158页第159页第160页第161页第162页第163页第164页第165页第166页第167页第168页第169页第170页第171页第172页第173页第174页第175页第176页第177页第178页第179页第180页第181页第182页第183页第184页第185页第186页
2001 Microchip Technology Inc.
Preliminary
DS41171A-page 35
PIC16C781/782
3.3
PORTB and the TRISB Register
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:
INITIALIZING PORTB
;* This code block will configure PORT B
;* as follows
;*
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
PORTB
; Select Bank 0
CLRF
PORTB
; Preset PORTB data
; reg.
BANKSEL
TRISB
; Select Bank 1
MOVLW
B’11001111’ ; Digital I/O
;
config data
MOVWF
TRISB
; Configure PORTB
; digital
MOVLW
B’00000011’ ; Analog I/O config
; data
MOVWF
ANSEL
; Configure PORTB
; analog
The RB0 pin can be configured as:
Digital I/O
ADC/Comparator Analog Input (AN4)
External Interrupt (INT)
Voltage Reference Output (VR)
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.
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
PORTB WEAK PULL-UP
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
PORTB INTERRUPT-ON-CHANGE
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)
A read or write to PORTB. This copies the cur-
rent state into the latch and ends the mismatch
condition.
b)
Clear flag bit RBIF.
相关PDF资料
PDF描述
VE-JTN-IY-B1 CONVERTER MOD DC/DC 18.5V 50W
VE-JTM-IY-B1 CONVERTER MOD DC/DC 10V 50W
PAG.M0.6NL.AC65N CONN PLUG 6POS STRGHT PIN SOLDER
PIC16C715T-20I/SO IC MCU OTP 2KX14 A/D 18SOIC
PIC16C715-04E/SS IC MCU OTP 2KX14 A/D 20SSOP
相关代理商/技术参数
参数描述
PIC16C782T-E/SO 功能描述:8位微控制器 -MCU w/Adv Analog 20MHz RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C782T-E/SS 功能描述:8位微控制器 -MCU w/Adv Analog 20MHz RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C782T-I/SO 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 16 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C782T-I/SS 功能描述:8位微控制器 -MCU 3.5KB 128 RAM 16 I/O RoHS:否 制造商:Silicon Labs 核心:8051 处理器系列:C8051F39x 数据总线宽度:8 bit 最大时钟频率:50 MHz 程序存储器大小:16 KB 数据 RAM 大小:1 KB 片上 ADC:Yes 工作电源电压:1.8 V to 3.6 V 工作温度范围:- 40 C to + 105 C 封装 / 箱体:QFN-20 安装风格:SMD/SMT
PIC16C8404ISO 制造商:MICROCHIP 功能描述:New