![Digilent Basys MX3 Скачать руководство пользователя страница 10](http://html1.mh-extra.com/html/digilent/basys-mx3/basys-mx3_reference-manual_2497447010.webp)
7/30/2019
Basys MX3 Reference Manual [Reference.Digilentinc]
https://reference.digilentinc.com/reference/microprocessor/basys-mx3/reference-manual?_ga=2.68739409.1349070004.1564406803-1961480359.…
10/52
This microcontroller has a weak pull-up and a weak pull-down connected to each pin. These pull-ups and pull-downs are enabled/disabled
by setting the corresponding bits from CNPU and CNPD registers to 1/0. The default setting is 0 (pull-ups and pull-downs disabled).
You can see a typical example of I/O pin configuration as output and digital output operations in the User LEDs section.
You can see a typical example of I/O pin configuration as input (including analog disable) and digital input operations in the User Buttons
section.
Refer to the PIC32MX3XX/4XX Family Datasheet, and the PIC32 Family Reference Manual, Section 12, IO Ports, for more detailed
information about the operation of the I/O Ports in the microcontroller.
Users may independently map the input and/or output of most digital peripherals to a fixed subset of digital I/O pins. Pins that support the
peripheral pin select feature include the designation “RPn” in their full pin designation, where “RP” designates a remappable peripheral and
“n” is the remappable port number.
The available peripherals to be mapped are digital-only. These include general serial communications (UART and SPI), general purpose
timer clock inputs, timer-related peripherals (input capture and output compare), and interrupt-on-change inputs.
On the other hand, some peripheral modules cannot be included in the peripheral pin select feature because it requires special I/O circuitry
on a specific port and it cannot be easily connected to multiple pins. These modules include I2C and analog-to-digital converters (ADC ()),
among others.
Peripheral pin select features are controlled using two sets of Special Function Registers (SFRs): one to map peripheral inputs, and one to
map peripheral outputs.
The peripheral inputs are mapped and named from the peripheral perspective (based on the peripheral). The [pin name]R registers, where
[pin name] refers to the specific peripheral pins, are used to configure peripheral input mapping. TABLE 12-1 in the PIC32MX370F512L
datasheet from Microchip (and Appendix 1 in this document) shows the different pins and their values available to assign to a peripheral pin.
The following example shows how different I/Os, such as pin RF4, can be assigned to U1RX input pin of the UART1 peripheral:
U1RXR = 0x02; // 0010 corresponds to RF4
The peripheral outputs are mapped and named from the pin perspective (on the basis of the pin). The RPnR registers (Register 12-2) are
used to control output mapping. The PIC32MX370F512L datasheet details in TABLE 12-2 (and Appendix 2 in this document) the values
corresponding to each IO pin, associated to each available peripheral pin. Note that the current version of the Basys MX3 schematic (B.0)
incorrectly lists RD6 and RD7 as remappable pins (RPD6 and RPD7, respectively); these pins are not remappable on the
PIC32MX370F512L.
The following example shows how different peripheral outputs, such as U3TX, can be assigned to pin RF4:
RPF4R = 0x01; // 0001 corresponds to U3TX
1.4. Remappable pins