Demonstrating 8-bit I2C Controller Read, Step 10: Test Application for ATmega4809

Last modified by Microchip on 2023/11/09 08:54

Verify Correct Operation
Launch MPLAB® Data Visualizer by clicking the Data Visualizer icon.

Data Visualizer Launch

Select the correct port and set it to 9600 baud.

MPLAB Data Visualizer Settings

Select Send to terminal for the comm channel.

Send to Terminal
MPLAB Data Visualizer will now show the temperature on the terminal screen. Pinch the thermocouple sensor to verify the temperature change.
Successful Output

Results

You observed the application read and display the temperature using the ATmega4809 MCU.

Analysis

You have again successfully demonstrated I2C functionality using MPLAB Code Configurator (MCC). This time, you leveraged MCC Foundation Service Libraries to switch MCUs which permitted the same application code (main.c) to be reused without modification. Foundation Services works seamlessly with MPLAB X IDE and MCC and the framework supports Microchip’s 8- and 16-bit PIC and AVR device families.

Foundation Services offers many benefits:

  • Common set of software interfaces across different devices
  • Simple application code portability between supported MCU's
  • Small code size
  • Easy to use
Conclusions

This tutorial provided you with training for configuring the PIC18F47Q10 and ATmega4809 I2C Foundation Libraries 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 supported by Foundation Services, you can explore a similar solution. Note that the device drivers would need to be updated using MCC since the MCU resources will be different.