Audio-Tone Generation Using a Lookup Table With MPLAB® Harmony v3: Step 8

Last modified by Microchip on 2023/11/09 09:07

Include Application-Specific Source Files and Add Required Code

Copy source files:
app_tone_lookup_table.c
app_tone_lookup_table.h
from this folder:
apps/training/solutions/audio_player/audio_player_lab1/dev_files
to this one:
apps/training/solutions/dev/audio_player/audio_player_lab1/firmware/src

Copy Source Solutions

Back to Top


Add the copied source files to your project.

  • Add app_tone_lookup_table.c to Source Files/app by right clicking and selecting Add Existing Item…

Add Existing Item Pulldown​​​

Back to Top


Add app_tone_lookup_table.h to Header Files/app by right clicking and selecting Add Existing Item…

Add Existing Item Pulldown

Select Item Window

Back to Top


Open the app.c file (in the MPLAB X IDE Projects pane under the Source Files > app folder) and add prototype routines as shown: Update app.c​​

Back to Top


Add code to the APP_Initialize function as shown:

Update app.c

Back to Top


Add code to the APP_Tasks function as shown: Update app.c

Save the file before closing.

Back to Top