A/D converter testing. Perform the following steps.
Step 1
Set the function generator output (in the lab) to between 0 and 5 V.
Step 2
Connect the AN1 pin to the functional generator output. Set the frequency to about 10 kHz.
Step 3
Write a program to perform the following operations:
• Configure the A/D module properly.
• Start the A/D conversion.
• Take 64 samples, convert them, and store the conversion results at appropriate SRAM locations.
• Compute the average value and store it in D.
If your demo board has a square waveform output, then select an output with a frequency close to 16 kHz. Connect it to the AN1 pin.