8 MCC Notifications:

This section details the hints, warnings and errors from MCC Melody.

8.1 MCC Hint: Selected Tad < minimum Tad (Time ADC Conv.)

Lower the ADC sampling frequency to be less than the time it takes for an ADC Conversion (Tad).

The Tad, time for ADC conversion, is too fast. The ADC sampling frequency needs to be lowered.

How to fix it: ADCC Clock>Clock Divider>Slow down ADC Clock.

8.2 MCC Hint: Baudrate error exceeds 2.2%

Low default clock frequncy may result in baud rate errors, such as when setting a baud rate of 115200.

In general, UART baud rate error must not exceed 2.2%. Many PIC microcontrollers have a default main clock frequency of 1 MHz. Notifications are given by MCC to correct this.

The default System Clock of the a number of PIC microcontrollers is 1 MHz (4 MHz / 4).

The System Clock can be in increased by increasing the clock frequency and/or reducing the Clock Divider.

Tip: A baud rate of 115200 can be achieved with an 8 MHz clock and an error of 2.2%.

8.3 MCC System Conflict: CLKIN on ANAx

For all MCC projects, system setup relates to certain fundamental configuration options of the microcontroller. one needs to ensure that there are no system conflicts.

The ADC example can be run on Curiosity Nano boards, such as the PIC18F-Q41 or PIC18F-Q43. The image below shows an ADC reading of the Q43, taken by using the potentiometer on the Curiosity Nano Explorer.

All three ADCC examples were tested using the hardware setup presented below.

Attention:

Some MCUs, such as the Q41 and Q43, have CLKIN on ANA7. So that this does not conflict with the POT on the CNano Explorer, disable the External Oscillator in System>Configuration Bits.