Datasheet

MPLAB
®
Starter Kit for Intelligent.Integrated.Analog User’s Guide
DS50002172A-page 22 2013 Microchip Technology Inc.
2.2.7 Audio/Microphone Demo
This section uses a bar graph display to represent the output of the unamplified electret
microphone. The 12-bit Pipeline A/D Converter is used to measure the amplitude of the
output signal.
To use this section, it is necessary to first connect MIC OUT (J7/J8, Pin 5) to ADC1 IN
(Pin 11) with a jumper wire (22 gauge recommended). The display bar graph increases
(extends to the right) as the amplitude of the input signal increases. As the
microphone’s output is low, it is necessary to directly tap on it or blow into it to get
a response.
The on-board electret microphone is biased at 1.6 VDC and is unamplified. To use the
microphone for voice recording, it will be necessary to add an amplifier. An appropriate
design would be an AC-coupled amplifier, with approximately 20X gain, and with an
output DC-biased to 1.6V (the microphone’s normal bias level) at midscale. An
example of a suitable design is provided in Appendix C. “Optional Microphone
Amplifier”.
2.2.8 Background Data Transmission
As the foreground demo application runs, a separate background process is also
executing. This process sequentially converts the input from three different analog
inputs into a digital value and exports this data over USB as a virtual COM (serial) port.
The Pipeline A/D demo must be selected for data to be output on the USB port. The
data is output in three hexadecimal words, representing the potentiometer value, the
light sensor value and the signal on AN8. The process repeats the conversions and
exports the most current values continuously.
The data from this process can be read from the virtual COM port by using any
available serial terminal emulator.
2.2.9 Entering Reduced Power (Sleep) Mode
During any foreground section of the application, pressing SW1 places the micro-
controller in Sleep mode. While in this mode, execution of the demo is paused while
the display returns to the 24-hour clock demo. Also, two “Z”s are added to the LCD
display. The background transmission of data over the virtual COM port also pauses.
The microcontroller wakes, once every minute, allowing the time display to be updated,
after which the microcontroller returns to Sleep mode.
Pressing SW1 again ends Sleep Mode. The “Z”s on the display are removed and the
clock display’s colon resumes blinking.