Design Benefits:
- Quick start from concept to prototype
- Modular design that is easily expandable and reusable for multiple applications
- Ready-to-use FAT32 File System and USB device stack for SD™ card
Data loggers are electronic sensors that record data over time. They are often small, battery-powered, portable, and Internet of Things (IoT) enabled with wireless communication, to facilitate event alarms, automatic reporting of data, and remote control.
This application demonstrates an example of using the MPLAB® Harmony v3 File System to access and modify the contents of an SD card using the SDSPI driver, the SPI PLIB, and MPLAB Harmony USB Device Stack to simultaneously enumerate an SD card as a USB Mass Storage Device (MSD).
In this reference solution, light intensity values are logged from the light sensor (I/O Xplained Pro) into an SD card over an SPI interface. The SD card continues to log the sensor data and simultaneously enumerate as a USB MSD. The logged data can be read from the SD card (enumerated as a USB MSD) onto a PC (as a USB host) via a USB interface.