MCC Melody Example Components: Adding PWM to ADC Data Streamer

Опубликовано: 01 Октябрь 2024
на канале: Microchip Developer Help
118
7

Solution project for this video on GitHub: https://github.com/microchip-pic-avr-...
Getting Started with MCC Melody Example Components playlist:    • Getting Started with MCC Melody Examp...  

The ADC Data Streamer example, of the MCC Melody ADCC Example Component, is used in the Callbacks implementation and displays ADCC samples visualized with the Data Streamer. An Analog-to-Digital Conversion measurement is taken every 100 ms on the selected analog channel, also toggling an LED and Debug GPIO.

A PWM1_16BIT component is added to this example. For more information, check out the "PIC® PWM Use Case: Gradually Brightening LED" use case from the How to Use the PWMx_16BIT PLIB Driver section in MCC Melody API reference for PIC16F/18F. It shows how adjusting the potentiometer influences the brightness of the PWM, which is mapped to a % of the range of the ADC value.

So, as the pot meter is adjusted, the brightness of the PWM is adjusted, mapped to a % of the range of the ADC value.

Solution project for this video on GitHub: https://github.com/microchip-pic-avr-...