Digit Recognition AI/ML Application on SAM E51 IGAT Curiosity Evaluation Kit using MPLAB Harmony v3: Step10

Step 10: Build and Program the Application

1

Clean and build your application by clicking on the Clean and Build clean_build_icon.png button.

In case of compilation errors, recheck the steps and build the project again.

2

Program your application to the device by clicking on the Make and Program program_icon.png button.

3

Open the Tera Term application (or another terminal console) on your PC and navigate to File > New connection.

tera_term_new_connection.png
Figure 1

4

Navigate to the Serial box in the opened window and select the port number that corresponds to the Embedded Debugger (EDGB) Virtual COM Port of your connected SAM E51 IGAT Xplained Pro Evaluation Kit. Then, press OK to open a serial connection.

tera_term_new_connection_window.png
Figure 2

5

Open the Serial port configuration of Tera Term by navigating to Setup > Serial port.

tera_term_serial_port.png
Figure 3

6

In the Serial Port window, verify that the Baud rate is set to 115200 and other elements are set as shown in Figure 4, then press OK.

tera_term_serial_port_setup.png
Figure 4

7

Figure 5 shows what you should see on the SAM E51 IGAT Curiosity Evaluation Kit display.

display_reset_screen.jpg
Figure 5

8

Draw any digit (from 0 to 9) on the SAM E51 IGAT Curiosity Evaluation Kit display as shown in Figure 6.

digit_drawn.jpg
Figure 6

9

The recognized digit will be displayed as shown in Figure 7.

result_screen.jpg
Figure 7

10

The scores for the corresponding 10 digits (indexes) will be displayed on the Tera-Term as shown in Figure 8.

result_on_tera_term.png
Figure 8

You can repeat the different digits (between 0 to 9) drawing on the display to verify the digit recognition.

 Results

You successfully created a Digit Recognition Artificial AI/ML application on a SAM E51 Integrated Graphics and Touch Curiosity Evaluation Kit. Also, you observed that the application recognized handwritten digits (numbers 0 to 9) drawn on the display of the SAM E51 IGAT Curiosity Evaluation kit, and the result was displayed on the same display screen.

 Analysis

You have successfully created your first AI/ML application using MPLAB® Harmony v3 on the SAM E51 microcontroller. Your application used the TensorFlow model for convolutional neural network problems, Touch Libraries, Legato Graphic Libraries, System Services, and all the fundamental elements like PLIBs and drivers that go into building a real-time application. Your application successfully recognized handwritten digits (numbers 0 to 9), and the result was displayed on the display screen.

In this application, you used MPLAB Harmony Configurator (MCC) and the MPLAB Harmony v3 Framework to configure the SAM E51. You verified the clock configurator to set up the CPU clock and peripheral clocks. You configured several peripherals, drivers, and the Timer System Service. You also configured the Touch Library and designed Display Graphics on the Legato Graphics Composer. You used the Pin Configurator to set up the pins for Touch Display and several peripheral pins.

 Conclusions

This tutorial provided you with the training of training a TensorFlow Machine Learning model and deploying it on an MCU for an AI/ML real-time application on a SAM E51 microcontroller with MPLAB Harmony v3 Framework. As a next step, you may customize this application and reconfigure some of the components used in this tutorial. You could also add new components (train a different model for another problem, MPLAB Harmony services, middleware components, drivers, etc.) to enhance this application to realize your end application.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.