
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.…
38/52
The output of the microphone module is an analog signal A_MIC, connected to an analog input pin of PIC32. This analog pin must be
sampled using the PIC32’s ADC () functionality to get a digital value. The PIC32 provides 10-bit data ADC () sampling. Read more on the
PIC32’s ADC () functionality in the Analog-To-Digital Converter (ADC ()) section of the PIC32 documentation.
The microphone on the Basys MX3 also features adjustable gain that is controlled using a thumbwheel potentiometer labeled MIC
VOLUME. This dial directly controls the gain of the A_MIC signal going into the PIC32.
Table 18.1 below shows the details about the A_MIC signal connecting the microphone module to the PIC32.
Table 18.1. Microphone connectivity.
Name
PIC32 Pin
SPA2410LR5H-B pin
A_MIC
AN4/C1INB/RB4
OUT
The A_MIC pin will be used as analog input pin:
The corresponding TRIS bit must be set to 1:
TRISBbits.TRISB4 = 1;
The corresponding ANSEL bit should be set to 1:
ANSELBbits.ANSB4 = 1;
The microphone usage is described through library functions in the MIC and ADC () libraries of the Basys MX3 library pack.
Implementation features include:
The ADC () module is initialized.
Channel 4 is read (corresponding to AN4).
18.1. Connectivity
18.2. Functionality