Step 5.1: Configure the SD Card Driver
This tutorial stores the digital photo frame images on the SD card. In the Options tab in MPLAB® Harmony Configurator (MHC), expand the Harmony Framework Configuration > Drivers > SD Card selection tree. Check the box beside Use SD Card Driver? and change the selections as shown in the following graphic.
Step 5.2: Configure the SPI Driver Used by the SD Card Driver
The SD card is connected to one of the PIC32's SPI ports (SPI2). Configure the SPI driver used by the SD card driver.
In MHC's Options tab, expand the Harmony Framework Configuration > Drivers > SPI selection tree. Note when you checked the box beside the Use SD Card Driver? selection, MHC automatically checked the Use SPI Driver? box for you. Configure the SPI driver as shown in the following graphic.
Step 5.3: Verify and Configure the SPI I/O Pins
Verify and configure the I/O pins used by the SPI module using the Graphical Pin Manager. Select the Pin Table tab in the MHC Output pane and configure the SPI pins as shown in the following graphic.
SDI2 is not configured in the pin table because the pin RD7 is shared between the SPI bus (SPI2) and Ethernet Transmit Clock (ETXCLK) of TCP/IP.
The pin RD7 is mapped to SDI2 in the application code.
Step 5.4: Configure the SD Card's File System Service
The File System service is required by the HTTP Server (to store its web page on the SD card). When you enabled the HTTP server, MHC automatically enabled this library for you. The Graphics Library will also use the SD card to store the pictures displayed in the digital photo frame.
You will be using a File Allocation Table (FAT) file system with the auto-mount feature on the SD card. The Graphics Library should be able to simultaneously access multiple files.
In the MHC's Options tab, expand the Harmony Framework Configuration > System Services > File System selection tree, and configure the File System service as shown in the following image.