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.…
16/52
Library functions for using the switches are contained in the Basys MX3 library pack, SWT library. However, the user can easily use the
switches without the SWT library, as presented above.
As shown in the connectivity table above, SW7 driving signal is shared with the TRIG_2 signal in 2×15 Pins Debug Header.
There are five buttons on the board, labeled BTNU, BTNL, BTNC, BTNR, BTND both on the board and in the schematic, attached to five
digital IO pins of PIC32. Reading the buttons is done by basic access to an input IO pin. Read more details in Digital Inputs and Outputs
chapter.
Figure 5.1 shows the way the buttons are electrically connected on the Basys MX3.
Table 5.1. Button connectivity.
Label
Schematic Name
PIC32 Pin
Pin Shared With
Description
BTNU
BTNU
PGEC1/AN1/RPB1/CTED12/RB1
PGC
Button up
BTNL
BTNL
PGED1/AN0/RPB0/RB0
PGD
Button left
BTNC
BTNC
RPF0/PMD11/RF0
TRIG_1
Button center
BTNR
BTNR
AN8/RPB8/CTED10/RB8
S0_PWM
Button right
BTND
BTND
RPA15/RA15
S1_PWM
Button down
All the pins must be defined as digital input: their corresponding TRIS bit must be set to 1, and analog function must be disabled for pins
corresponding to BTNU, BTNL, BTNR, BTND.
4.3. Shared Pins
5. User Buttons
5.1. Connectivity