Step 8.1 – Verify Correct Operation
Disconnect the USB cable. With both boards disconnected, both MCUs will run. When the potentiometer is turned, the LED on the MCU2 demonstration board will adjust its brightness accordingly.
Step 8.2 – Results
You observed the application read the potentiometer voltage and adjust the LED brightness in relation to its position.
Step 8.3 – Analysis
You have successfully demonstrated DMA functionality using the MPLAB® Code Configurator (MCC). Your project used fundamental DMA elements to move data between peripherals that can benefit almost any application. This demonstration continuously reads the potentiometer voltage, moves data to the UART peripheral for transmission, moves data from another UART after reception, and updates the PWM duty cycle without using a single line of code in the execution loop.
You used MCC to configure the system clock, Timer0 to create a continuous 50 ms trigger, ADC to read the potentiometer voltage, UART to send and transmit data, GPIO for analog and digital modes and input and output operations, PWM to control LED brightness and DMA to move data between peripherals.
Step 8.4 - Conclusions
This tutorial provided you with training for configuring the PIC18F57Q43 DMA using MPLAB X IDE and MCC. As a next step, you can create your own application to suit your needs. Ultimately, if you use another MCU with a DMA, you can explore a similar solution. Note that the configuration would change since the MCU resources will be different.