User manual

GHI Electronics,LLC Embedded Master User Manual
Hardware and Software Library
11.13. Storage Devices (SD, USB) / FAT File System
FAT File System lets you create and manipulate files and folders on the connected SD and
USB storage devices.
In Micro Framework V2.5, GHI offered its own FAT32/16/12 system stack and developers
were able to use SD cards and USB thumb drives to write reliable files/folder on these
storage devices.
With Micro Framework V3.0, FAT32 is supported by MFW itself. The user should refer
to .Net Micro Framework documentation for details on handling files/folders.
Note: Only FAT32 format is supported. You can format your storage device on a PC with a
FAT32 option before using on Embedded Master. If your device is not FAT32, you will get
an Exception when accessing files/folders.
Before using the storage devices and accessing them with Micro Framework, the user
must mount the file system first. This is done using Embedded Master library provided with
the SDK. SD card and USB memory are NOT mounted automatically.
11.13.1 SD/MMC Memory
SD and MMC memory cards have very similar interface. Embedded Master Module
supports both cards and also supports SDHC (over 2GB) cards. The interface runs at 4-
bits when using SD cards and 1-bit when using MMC cards. There are 2 smaller versions
of SD cards, mini SD and micro SD. All 3 card sizes are identical as far as the interface.
The only difference is the physical dimensions.
PIN# TFT# Name Description
52 62 SD_DAT3 SD memory Data 3
53 63 SD_DAT2 SD memory Data 2
54 65 SD_DAT1 SD memory Data 1
55 65 SD_CLK SD memory Clock
56 66 SD_DAT0 SD memory Data 0
57 67 SD_CMD SD memory Command
58 68 SD_PWR SD memory Power
The user would be interest in mounting / unmounting the file system on the SD card
automatically when a SD card is inserted or ejected. To do this, there is a pin on the SD
card connector called Card Detect which works like a switch. Connect this to a GPIO
InterruptPort on Embedded Master and call mount, unmount appropriately.
11.13.2 USB Memory
Before proceeding, make sure you have an understanding of how USB devices are
Rev. 2.06 TFT Page 75 of 102 www.ghielectronics.com