Basys MX3™ Board Reference Manual
The Basys MX3 also has a red button labeled RESET. This button is connected directly to the MCLR pin of the PIC32
and will trigger it to be reset.
5.1
Connectivity
Schematic
Label
Name
BTNU
BTNU
BTNL
BTNL
BTNC
BTNC
BTNR
BTNR
BTND
BTND
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.
TRISBbits.TRISB1 = 1; // RB1 (BTNU) configured as input
ANSELBbits.ANSB1 = 0; // RB1 (BTNU) disabled analog
TRISBbits.TRISB0 = 1; // RB1 (BTNL) configured as input
ANSELBbits.ANSB0 = 0; // RB1 (BTNL) disabled analog
TRISFbits.TRISF4 = 1; // RF0 (BTNC) configured as input
TRISBbits.TRISB8 = 1; // RB8 (BTNR) configured as input
ANSELBbits.ANSB8 = 0;
TRISAbits.TRISA15 = 1;
5.2
Functionality
To read the buttons, the user needs to read the corresponding digital input pin, a value of 1 indicating the button is
pressed or 0 indicating the button is released:
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Figure 5.1. Button schematic diagram.
PIC32 Pin
PGEC1/AN1/RPB1/CTED12/RB1
PGED1/AN0/RPB0/RB0
RPF0/PMD11/RF0
AN8/RPB8/CTED10/RB8
RPA15/RA15
Table 5.1. Button connectivity.
// RB8 (BTNR) disabled analog
// RA15 (BTND) configured as input
Pin Shared
Description
With
PGC
Button up
PGD
Button left
TRIG_1
Button center
S0_PWM
Button right
S1_PWM
Button down
Page 17 of 56
Need help?
Do you have a question about the Basys MX3 and is the answer not in the manual?
Questions and answers