欢迎访问ic37.com |
会员登录 免费注册
发布采购

PIC17LC42-16I/JW 参数 Datasheet PDF下载

PIC17LC42-16I/JW图片预览
型号: PIC17LC42-16I/JW
PDF下载: 下载PDF文件 查看货源
内容描述: 高性能8位CMOS EPROM / ROM微控制器 [High-Performance 8-Bit CMOS EPROM/ROM Microcontroller]
分类和应用: 微控制器可编程只读存储器电动程控只读存储器
文件页数/大小: 240 页 / 1141 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第49页浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第50页浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第51页浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第52页浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第54页浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第55页浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第56页浏览型号PIC17LC42-16I/JW的Datasheet PDF文件第57页  
PIC17C4X  
9.1  
PORTA Register  
9.0  
I/O PORTS  
The PIC17C4X devices have five I/O ports, PORTA  
through PORTE. PORTB through PORTE have a corre-  
sponding Data Direction Register (DDR), which is used  
to configure the port pins as inputs or outputs. These  
five ports are made up of 33 I/O pins. Some of these  
ports pins are multiplexed with alternate functions.  
PORTA is a 6-bit wide latch. PORTA does not have a  
corresponding Data Direction Register (DDR).  
Reading PORTA reads the status of the pins.  
The RA1 pin is multiplexed with TMR0 clock input, and  
RA4 and RA5 are multiplexed with the USART func-  
tions. The control of RA4 and RA5 as outputs is auto-  
matically configured by the USART module.  
PORTC, PORTD, and PORTE are multiplexed with the  
system bus. These pins are configured as the system  
bus when the device’s configuration bits are selected to  
Microprocessor or Extended Microcontroller modes. In  
the two other microcontroller modes, these pins are  
general purpose I/O.  
9.1.1  
USING RA2, RA3 AS OUTPUTS  
The RA2 and RA3 pins are open drain outputs. To use  
the RA2 or the RA3 pin(s) as output(s), simply write to  
the PORTA register the desired value. A '0' will cause  
the pin to drive low, while a '1' will cause the pin to float  
(hi-impedance). An external pull-up resistor should be  
used to pull the pin high.Writes to PORTA will not affect  
the other pins.  
PORTA and PORTB are multiplexed with the peripheral  
features of the device. These peripheral features are:  
• Timer modules  
• Capture module  
• PWM module  
Note: When using the RA2 or RA3 pin(s) as out-  
put(s), read-modify-write instructions (such  
as BCF, BSF, BTG) on PORTA are not rec-  
ommended.  
• USART/SCI module  
• External Interrupt pin  
When some of these peripheral modules are turned on,  
the port pin will automatically configure to the alternate  
function. The modules that do this are:  
Such operations read the port pins, do the  
desired operation, and then write this value  
to the data latch. This may inadvertently  
cause the RA2 or RA3 pins to switch from  
input to output (or vice-versa).  
It is recommended to use a shadow regis-  
ter for PORTA. Do the bit operations on this  
shadow register and then move it to  
PORTA.  
• PWM module  
• USART/SCI module  
When a pin is automatically configured as an output by  
a peripheral module, the pins data direction (DDR) bit  
is unknown. After disabling the peripheral module, the  
user should re-initialize the DDR bit to the desired con-  
figuration.  
FIGURE 9-1: RA0 AND RA1 BLOCK  
DIAGRAM  
The other peripheral modules (which require an input)  
must have their data direction bit configured appropri-  
ately.  
Note: A pin that is a peripheral input, can be con-  
figured as an output (DDRx<y> is cleared).  
The peripheral events will be determined  
by the action output on the port pin.  
DATA BUS  
RD_PORTA  
(Q2)  
Note: I/O pins have protection diodes to VDD and VSS.  
1996 Microchip Technology Inc.  
DS30412C-page 53  
This document was created with FrameMaker 4 0 4  
 复制成功!