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

PIC32MX130F064D 参数 Datasheet PDF下载

PIC32MX130F064D图片预览
型号: PIC32MX130F064D
PDF下载: 下载PDF文件 查看货源
内容描述: 32位微控制器(高达128 KB的闪存和32 KB SRAM)与音频和图形接口, USB接口,以及高级模拟 [32-bit Microcontrollers (up to 128 KB Flash and 32 KB SRAM) with Audio and Graphics Interfaces, USB, and Advanced Analog]
分类和应用: 闪存微控制器静态存储器
文件页数/大小: 320 页 / 6070 K
品牌: MICROCHIP [ MICROCHIP ]
 浏览型号PIC32MX130F064D的Datasheet PDF文件第140页浏览型号PIC32MX130F064D的Datasheet PDF文件第141页浏览型号PIC32MX130F064D的Datasheet PDF文件第142页浏览型号PIC32MX130F064D的Datasheet PDF文件第143页浏览型号PIC32MX130F064D的Datasheet PDF文件第145页浏览型号PIC32MX130F064D的Datasheet PDF文件第146页浏览型号PIC32MX130F064D的Datasheet PDF文件第147页浏览型号PIC32MX130F064D的Datasheet PDF文件第148页  
PIC32MX1XX/2XX  
11.1.4  
INPUT CHANGE NOTIFICATION  
11.1 Parallel I/O (PIO) Ports  
The input change notification function of the I/O ports  
allows the PIC32MX1XX/2XX devices to generate  
interrupt requests to the processor in response to a  
change-of-state on selected input pins. This feature can  
detect input change-of-states even in Sleep mode,  
when the clocks are disabled. Every I/O port pin can be  
selected (enabled) for generating an interrupt request  
on a change-of-state.  
All port pins have ten registers directly associated with  
their operation as digital I/O. The data direction register  
(TRISx) determines whether the pin is an input or an  
output. If the data direction bit is a ‘1’, then the pin is an  
input. All port pins are defined as inputs after a Reset.  
Reads from the latch (LATx) read the latch. Writes to  
the latch write the latch. Reads from the port (PORTx)  
read the port pins, while writes to the port pins write the  
latch.  
Five control registers are associated with the CN func-  
tionality of each I/O port. The CNENx registers contain  
the CN interrupt enable control bits for each of the input  
pins. Setting any of these bits enables a CN interrupt  
for the corresponding pins.  
11.1.1  
OPEN-DRAIN CONFIGURATION  
In addition to the PORTx, LATx, and TRISx registers for  
data control, some port pins can also be individually  
configured for either digital or open-drain output. This is  
controlled by the Open-Drain Control register, ODCx,  
associated with each port. Setting any of the bits con-  
figures the corresponding pin to act as an open-drain  
output.  
The CNSTATx register indicates whether a change  
occurred on the corresponding pin since the last read  
of the PORTx bit.  
Each I/O pin also has a weak pull-up and a weak  
pull-down connected to it. The pull-ups act as a  
current source or sink source connected to the pin,  
and eliminate the need for external resistors when  
push-button or keypad devices are connected. The  
pull-ups and pull-downs are enabled separately using  
the CNPUx and the CNPDx registers, which contain  
the control bits for each of the pins. Setting any of  
the control bits enables the weak pull-ups and/or  
pull-downs for the corresponding pins.  
The open-drain feature allows the generation of out-  
puts higher than VDD (e.g., 5V) on any desired 5V-tol-  
erant pins by using external pull-up resistors. The  
maximum open-drain voltage allowed is the same as  
the maximum VIH specification.  
See the “Pin Diagrams” section for the available pins  
and their functionality.  
11.1.2  
CONFIGURING ANALOG AND  
DIGITAL PORT PINS  
Note:  
Pull-ups and pull-downs on change notifi-  
cation pins should always be disabled  
when the port pin is configured as a digital  
output.  
The ANSELx register controls the operation of the  
analog port pins. The port pins that are to function as  
analog inputs must have their corresponding ANSEL  
and TRIS bits set. In order to use port pins for I/O  
functionality with digital modules, such as Timers,  
UARTs, etc., the corresponding ANSELx bit must be  
cleared.  
An additional control register (CNCONx) is shown in  
Register 11-3.  
11.2 CLR, SET and INV Registers  
The ANSELx register has a default value of 0xFFFF;  
therefore, all pins that share analog functions are  
analog (not digital) by default.  
Every I/O module register has a corresponding CLR  
(clear), SET (set) and INV (invert) register designed to  
provide fast atomic bit manipulations. As the name of  
the register implies, a value written to a SET, CLR or  
INV register effectively performs the implied operation,  
but only on the corresponding base register and only  
bits specified as ‘1’ are modified. Bits specified as ‘0’  
are not modified.  
If the TRIS bit is cleared (output) while the ANSELx bit  
is set, the digital output level (VOH or VOL) is converted  
by an analog peripheral, such as the ADC module or  
Comparator module.  
When the PORT register is read, all pins configured as  
analog input channels are read as cleared (a low level).  
Reading SET, CLR and INV registers returns undefined  
values. To see the affects of a write operation to a SET,  
CLR or INV register, the base register must be read.  
Pins configured as digital inputs do not convert an  
analog input. Analog levels on any pin defined as a  
digital input (including the ANx pins) can cause the  
input buffer to consume current that exceeds the  
device specifications.  
11.1.3  
I/O PORT WRITE/READ TIMING  
One instruction cycle is required between a port  
direction change or port write operation and a read  
operation of the same port. Typically this instruction  
would be an NOP.  
DS61168D-page 144  
Preliminary  
© 2011-2012 Microchip Technology Inc.