PIC16CR83 Datasheet

  • PIC16CR83

  • 18-pin Flash/EEPROM 8-Bit Microcontrollers

  • 2018.18KB

  • 125页

  • MICROCHIP

扫码查看芯片数据手册

上传产品规格书

PDF预览

PIC16F8X
5.2
PORTB and TRISB Registers
PORTB is an 8-bit wide bi-directional port. The
corresponding data direction register is TRISB. A '1' on
any bit in the TRISB register puts the corresponding
output driver in a hi-impedance mode. A '0' on any bit
in the TRISB register puts the contents of the output
latch on the selected pin(s).
Each of the PORTB pins have a weak internal pull-up.
A single control bit can turn on all the pull-ups. This is
done by clearing the RBPU (OPTION_REG<7>) bit.
The weak pull-up is automatically turned off when the
port pin is con铿乬ured as an output. The pull-ups are
disabled on a Power-on Reset.
Four of PORTB鈥檚 pins, RB7:RB4, have an interrupt on
change feature. Only pins con铿乬ured as inputs can
cause this interrupt to occur (i.e., any RB7:RB4 pin
con铿乬ured as an output is excluded from the interrupt
on change comparison). The pins value in input mode
are compared with the old value latched on the last
read of PORTB. The 鈥渕ismatch鈥?outputs of the pins are
OR鈥檈d together to generate the RB port
change interrupt.
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)
Read (or write) PORTB. This will end the mis-
match condition.
Clear 铿俛g bit RBIF.
A mismatch condition will continue to set the RBIF bit.
Reading PORTB will end the mismatch condition, and
allow the RBIF bit to be cleared.
This interrupt on mismatch feature, together with
software con铿乬urable pull-ups on these four pins allow
easy interface to a key pad and make it possible for
wake-up on key-depression (see AN552 in the
Embedded Control Handbook).
Note 1:
For a change on the I/O pin to be
recognized, the pulse width must be at
least T
CY
(4/f
OSC
) wide.
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.
FIGURE 5-3:
BLOCK DIAGRAM OF PINS
RB7:RB4
V
DD
FIGURE 5-4:
RBPU
(1)
BLOCK DIAGRAM OF PINS
RB3:RB0
V
DD
weak
P pull-up
Data Latch
D
Q
CK
TRIS Latch
D
Q
I/O
pin
(2)
RBPU
(1)
Data Latch
D
CK
TRIS Latch
D
WR TRIS
CK
Q
Q
weak
P pull-up
Data bus
WR Port
Data bus
WR Port
I/O
pin
(2)
WR TRIS
TTL
Input
Buffer
CK
TTL
Input
Buffer
RD TRIS
RD TRIS
Latch
Q
RD Port
Set RBIF
From other
RB7:RB4 pins
D
EN
RB0/INT
Schmitt Trigger
Buffer
Note 1: TRISB = '1' enables weak pull-up
(if RBPU = '0' in the OPTION_REG register).
2: I/O pins have diode protection to V
DD
and V
SS
.
RD Port
Note 1: TRISB = '1' enables weak pull-up
(if RBPU = '0' in the OPTION_REG register).
2: I/O pins have diode protection to V
DD
and V
SS
.
RD Port
RD Port
Q
D
EN
Q
D
EN
1998 Microchip Technology Inc.
DS30430C-page 23

PIC16CR83 PDF文件相关型号

PIC16CR84

PIC16CR83相关型号PDF文件下载

您可能感兴趣的PDF文件资料

热门IC型号推荐

扫码下载APP,
一键连接广大的电子世界。

在线人工客服

买家服务:
卖家服务:

0571-85317607

客服在线时间周一至周五
9:00-17:30

关注官方微信号,
第一时间获取资讯。

建议反馈
返回顶部

建议反馈

联系人:

联系方式:

按住滑块,拖拽到最右边
>>
感谢您向阿库提出的宝贵意见,您的参与是维库提升服务的动力!意见一经采纳,将有感恩红包奉上哦!