Skip to content

The ADCC Basic Printf Example, of the MCC Melody ADCC Example Component, used in the Polled implementation. ADC Conversions are taken every 500 ms. The LED is toggled and the result is sent to the PC terminal.

License

Notifications You must be signed in to change notification settings

microchip-pic-avr-examples/pic18f57q43-adcc-basic-printf-polled-mcc

Repository files navigation

MCHP

MCC Melody ADC Basic Printf Example - Polled Implementation (PIC18F57Q43)

The ADC Basic Printf example, of the MCC Melody ADCC Example Component, is used in the Polled implementation. Analog-to-Digital (A/D) conversions are taken every 500 ms. The LED is toggled and the result is sent to the PC terminal.

Video Building This Example

Video Building this Example

Video: Introducing MCC Melody Example Components (while building the Polled version of the Timer Toggle LED example).

MCC Melody Example Components

Example Components are a tight integration of learning material directly into MCC. This allows users to conveniently place configuration instructions side-by-side to the components they are configuring. For more information, refer to the MCC Melody Example Components Introduction.

MCC Melody Example Components

Complete projects, available in MPLAB® Discover or GitHub, are specific to a board and microcontroller. However, the current project could be recreated on a range of supported microcontrollers by following the steps in the example component.

To explore what an example component is, as well as the difference between example and implementation, see MCC Melody Example Components - The Basics.

Example Components are related to MCC Melody Design Patterns for Control Flow, which shows different standard ways to organize main.c and other application-level files, such as Polling, Interrupt and Callback, or State Machine Design Patterns. Users might be familiar with each of these patterns, but...

  • What support does MCC Melody provide for each?
  • What are the recommended ways of building on the MCC Melody generated code? 

Software Used

  • MPLAB® X IDE 6.20.0 or newer (MPLAB® X IDE 6.20)

  • MPLAB® XC8 2.46.0 or newer (MPLAB® XC8 2.46)

  • MPLAB® Code Configurator (MCC) Plugin Version 5.5.1 or newer (Tools>Plugins>Installed, search: "MCC")

  • ADC Converter with Computation (ADCC) Example Component 1.0.0 or newer

  • MCC Core 5.7.1 or newer

  • MCC Melody Core 2.7.1 or newer (Communicates with the MCC core, providing views and other functionality for MCC Melody)

MCC Core Version

Hardware Used

Setup

All instructions required to recreate this example are listed below, under Configuration Instructions.

TIMER Toggle LED, Polled Implementation

Once the program is loaded in MPLAB X IDE, find more information from Tooltips and links next to the instructions Tooltip and link.

Tooltips and context help

Operation

The image below shows the ADCC Basic Printf example running, using the MPLAB Data Visualizer.

  1. Click the Data Visualizer icon icon to open the MPLAB Data Visualizer.
  2. Under Debug GPIO, click the Add to time plot icon icon, to add to the time plot.
  3. Under the COMx port, associated with your board, click the Settings Gear icon to set the Baud Rate to 115200.
  4. Then click the Display as text in the terminal icon icon to display text from the COMx port on the terminal.

Note: If your board is not recognised by the MPLAB Data Visualizer, go to the Device Manager (Windows) to determine the COMx number.

Running the ADCC Basic Printf Example

Summary

For more example components, open the stand-alone Content Manager CM_icon in MCC.

Standalone_CM

About

The ADCC Basic Printf Example, of the MCC Melody ADCC Example Component, used in the Polled implementation. ADC Conversions are taken every 500 ms. The LED is toggled and the result is sent to the PC terminal.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published