Demonstrating 8-bit I2C Controller Read, Step 10: Test Application for ATmega4809
Verify Correct Operation
Launch MPLAB® Data Visualizer by clicking the Data Visualizer icon.
Select the correct port and set it to 9600 baud.
Select Send to terminal for the comm channel.
MPLAB Data Visualizer will now show the temperature on the terminal screen. Pinch the thermocouple sensor to verify the temperature change.
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.