Microchip Technology DM240015 Data Sheet

Page of 42
The Demonstration Application
 2013 Microchip Technology Inc.
 
DS50002172A-page 21
2.2.3
Pipeline A/D Demo
This section of the demo uses the 12-bit Pipeline A/D Converter. For more information 
on this module and its operation, refer to the “PIC24F Family Reference Manual”
“12-Bit, High-Speed Pipeline A/D Converter”
 (DS30686).
The Pipeline A/D demo uses two analog input channels of the Pipeline A/D Converter 
to display a pair of bar graphs. The bar graphs extend, left-to-right, across the LCD. The 
top bar is the reading of the potentiometer, R7 (AN19), and the lower bar graph is the 
ambient light sensor, Q1 (AN22). Turning the thumb wheel counterclockwise, or 
covering the light sensor, reduces the corresponding bar.
While in this demo, pressing the  pad advances through a sequence of display options. 
On the first touch, the display shows, “19:xxxx”, where “xxxx” is the hexadecimal value 
from the A/D of the potentiometer’s current setting (range, 0 to 0FFFh). 
Pressing  again displays, “22:yyyy”, where “yyyy” is the hexadecimal value from 
the A/D of the light sensor; the value increases with less light.
Pressing  again displays, “8:zzzz”, to display the converted value on AN8 (Pin 11 
on JP7/8), where “zzzz” is the hexadecimal value of the voltage. If a voltage is not 
present, and AN8 is not tied to V
SS
, this value will be random.
Pressing  once more returns to the original display.
The data from the potentiometer, light sensor and AN8 are output over the USB port, 
as described in 
, via the background 
data transmission process.
2.2.4
Stereo DAC Demo
This section generates three audio sine waves, one octave apart. The demo applica-
tion calculates a 512-point sine wave and stores the 10-bit values for each point in 
RAM. Timer4 is used to transfer (via the DMA bus) the RAM buffer to the DAC Output 
registers. The output frequency is calculated, on-the-fly, as a passed parameter in Hz. 
The frequencies of the three tones generated are: 110 Hz, 220 Hz and 440 Hz (A
2
, A
3
 
and A
4
 or middle A).
The raw DAC output is passed through the 16 kHz low-pass filters and to the 
headphone jack.The maximum voltage generated by the demo is 800 mV p-p.
Pressing the  key steps through the three different frequencies.
2.2.5
TC77 Temperature Sensor Demo
This section uses the TC77 temperature sensor (U8) to obtain the ambient tempera-
ture. This sensor transfers data to the microcontroller via the SPI bus. The chip select 
is provided by the port pin, RE9, and is routed via jumper, JP7.
By default, the demo displays the board’s current temperature in degrees Centigrade. 
Pressing  converts the reading to Fahrenheit. The LCD displays the thermometer 
icon and the appropriate temperature unit icon.
2.2.6
LCD Test Demo
This section of the demo displays all the available graphic icons and sequentially 
flashes each one while showing their name in the dot-matrix portion of the LCD. This 
demo repeats continuously until another portion is selected. There is no submenu.
Note:
Do not use excessive volume with this part of the demo. The maximum output 
(800 mV p-p) may produce an audio output in excess of safe listening levels.