PIC16CR83 Datasheet

  • PIC16CR83

  • 18-pin Flash/EEPROM 8-Bit Microcontrollers

  • 2018.18KB

  • 125页

  • MICROCHIP

扫码查看芯片数据手册

上传产品规格书

PDF预览

PIC16F8X
5.0
I/O PORTS
EXAMPLE 5-1:
CLRF
PORTA
INITIALIZING PORTA
;
;
;
;
;
;
;
;
;
;
;
Initialize PORTA by
setting output
data latches
Select Bank 1
Value used to
initialize data
direction
Set RA<3:0> as inputs
RA4 as outputs
TRISA<7:5> are always
read as '0'.
The PIC16F8X has two ports, PORTA and PORTB.
Some port pins are multiplexed with an alternate func-
tion for other features on the device.
5.1
PORTA and TRISA Registers
BSF
MOVLW
STATUS, RP0
0x0F
PORTA is a 5-bit wide latch. RA4 is a Schmitt Trigger
input and an open drain output. All other RA port pins
have TTL input levels and full CMOS output drivers. All
pins have data direction bits (TRIS registers) which can
con铿乬ure these pins as output or input.
Setting a TRISA bit (=1) will make the corresponding
PORTA pin an input, i.e., put the corresponding output
driver in a hi-impedance mode. Clearing a TRISA bit
(=0) will make the corresponding PORTA pin an output,
i.e., put the contents of the output latch on the selected
pin.
Reading the PORTA register reads the status of the pins
whereas writing to it will write to the port latch. All write
operations are read-modify-write operations. So a write
to a port implies that the port pins are 铿乺st read, then this
value is modi铿乪d and written to the port data latch.
The RA4 pin is multiplexed with the TMR0 clock input.
MOVWF
TRISA
FIGURE 5-2:
Data
bus
WR
PORT
BLOCK DIAGRAM OF PIN RA4
D
Q
Q
CK
N
Data Latch
V
SS
D
Q
Q
RA4 pin
WR
TRIS
CK
TRIS Latch
FIGURE 5-1:
Data
bus
D
WR
Port
BLOCK DIAGRAM OF PINS
RA3:RA0
RD TRIS
Q
V
DD
Q
Schmitt
Trigger
input
buffer
D
EN
EN
CK
Q
P
RD PORT
Data Latch
N
D
WR
TRIS
Q
V
SS
CK
Q
TTL
input
buffer
I/O pin
TMR0 clock input
Note: I/O pin has protection diodes to V
SS
only.
TRIS Latch
RD TRIS
Q
D
EN
RD PORT
Note: I/O pins have protection diodes to V
DD
and V
SS
.
1998 Microchip Technology Inc.
DS30430C-page 21

PIC16CR83 PDF文件相关型号

PIC16CR84

PIC16CR83相关型号PDF文件下载

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

热门IC型号推荐

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

在线人工客服

买家服务:
卖家服务:

0571-85317607

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

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

建议反馈
返回顶部

建议反馈

联系人:

联系方式:

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