Build, Program, and Observe the Output
2
The SAM E70 Xplained Evaluation Kit includes an on-board Embedded Debugger (EDBG) chip for programming and debugging the ATSAME70Q21B device. Connect the Type-A Male to Micro-B USB cable to the Micro-B DEBUG USB port to power and debug the kit. Also, connect another cable to the TARGET USB port for the USB CDC Serial Port.
Results
Congratulations! You have now completed this training module and have successfully created a USB device exposing various functionality through a terminal-based menu. You observed that the application measures temperature by reading the AT30TSE758A temperature sensor chip on the I/O1 Xplained Pro every second using I2C and stores these values into the sensor chip's own integrated EEPROM. Further, you observed that the application also uses an ADC channel to read the output voltage of the TEMT6000 ambient light sensor on the I/O1 Xplained Pro. Finally, we controlled the state of the SAM E70 Xplained User LED via a terminal-based menu made available through the SAM E70 Xplained target USB port by configuring it as a USB CDC class device and also made the light and temperature sensor data available through it.
Analysis
You should now be well equipped to create an application using MPLAB® Harmony v3 on the SAM E70 microcontroller. Your application used all the fundamental elements that go into building a USB device. You used the MPLAB Code Configurator (MCC) to configure and generate drivers for the SAM E70 using the MPLAB Harmony v3 Framework. You used the clock configurator to set up the CPU clock and peripheral clocks. You configured and generated drivers for I²C and USB High-Speed. You configured TWIHS, AFEC, and TC PLIBs. You configured System Services and Middleware libraries like TIME System Service and USB Device Stack (i.e., the CDC Function Driver). You also used the Pin Configurator to set up the pins for LEDs and peripherals (I²C).
Conclusion
This training module covered all the fundamental components needed to build a USB device using MPLAB Harmony v3 Framework on the SAM E70 microcontroller. As a next step, you may customize this application and reconfigure some of the components used in this lab. You may also add new components (drivers, etc.) to extend this basic USB device and ultimately prototype your end application.