Web Photo Frame Tutorial: Step 5

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.

7_7.png

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.

7_8.png

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.

pin_conflict.png

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.

2_3_1.png



Next Step >

© 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.