January 16th 2023

How to operate SD Card on SD Module?

SD card module means the process of reading and writing SD card / TF card is with single chip microcomputer. SD card wholesale is a low-voltage flash memory product with two standard operation modules, MMC and SPI, respectively. For the MMC operation mode, the reading and writing speed is fast, meanwhile it has many control signal lines. Thus, the operation is complicated. For the SPI operation module, the speed is slow, and has fewer lines, so the operation is relatively simple.

DSM-SDF-100

Content

1 Overview 2 Technical Background 3 Technical Specifications 4 operation functions 5 pin definitions 6 operation commands 7 Application Areas 8 Development Kits

If you’re seeking professional assistance with your academic assignments, consider engaging the services of ghostwriter hausarbeit. This platform is dedicated to providing expert support in crafting high-quality academic papers, ensuring that your work meets the highest standards. Whether you’re tackling a challenging research paper, thesis, or any other academic project, Ghostwriter-Hausarbeit offers a team of skilled writers ready to help you achieve academic success. Visit their website for more information on how their services can contribute to your academic excellence.

1.Overview for SD card wholesale

SD card reading/writing module

The SD card reading and writing module has a built-in file system and can directly read and write files. It can be used in single-chip microcomputer to realize mass capacity storage solution. With module, single-chip microcomputer can directly perform standard file system operations such as directory traversal, directory creation, directory deletion, file creation, file deletion, file modification, and card formatting, without knowing the internal storage structure of the SD card and the implementation details of the file system.

Especially, since SD cards has become more popular in our lives.with the popularity of SD cards in life, it has become a trend for embedded systems to integrate the functions of reading and writing SD cards into the system.

2.Technical Background

With the development of technology, it has become a common requirement for devices to use SD cards as storage devices. Due to limitation in resources, normally, traditional single-chip microcomputers cannot provide file system. Therefore, it cannot read and write files in the SD card. Using this module, the single-chip microcomputer can directly operate files in the SD card without using file system. Obviously, it can launch stable products in the shortest time, avoid research and development risks to the greatest extent, and save research and development costs.

3.Technical Specifications

1. Support standard FAT file system, the SD card wholesale operated by the module can be directly inserted into the computer to read and write.

2. It has a built-in Micro SD card slot, users can also expand other memory card slots by themselves. Moreover, it can support various types of SD and MMC cards.

3. When it communicates with the single-chip microcomputer as a SPI slave, and the maximum speed of the SPI bus can reach 4M bps. The speed of which it reads SD card files is not only up to 128K bytes/sec, but also the writing speed can be up to 64K bytes/sec.

4. Firstly, the module can support the capacity up to 2GB. However, If you use the capacity above 2GB, the card will be used as a 2G card.

5. its size is 50mm*20mm, the 2.54mm pitch universal pin header makes it easy to integrate.

4.Operation Function of SD card wholesale

1. check the total capacity and remaining space of the SD card, check other card management operations like SD card formatting.

2. Directory management operations such as create a directory, delete a directory, enter a directory, and return to the root directory.

3. File management operations such as create files, delete files, open files, and close files.

4. File reading and writing operations such as read files, write files, clear files, and modify the current position of files.

5. Other maintenance operations such as detect whether the SD card exists, notify the current time, query the module firmware version number.

These functions are sufficient for reading and writing files in the SD card. Also, the requirements for the single-chip microcomputer that perform these operations are not high. What’s more, all ram byte that exceeds 32K bytes can use this module to complete the reading and writing of the SD card.

5.Pin Definition

Pin number

Pin name

direction

Function description

1

RST#

input

Module reset

2

SD_DO

output

Data output of external memory card

3

SD_DET

input

Data input of external memory card

4

SD_CLK

output

Clock signal of external memory card

5

SD_DI

input

Data input of external memory card

6

SD_CS

output

Chip select signal of external memory card

7

V33

input

3.3V power

8

BZ

output

Module busy indication

9

SCS

input

Chip select signal of SPI interface

10

RXD

input

Data input of debug serial port

11

SCK

input

Clock signal of SPI interface

12

TXD

output

Data output of debug serial port

13

SDI

input

Data input of SPI interface

14

INT#

Output

Data ready indication

15

SDO

output

Data output of SPI interface

16

NC

Reserve

17

WAKE_UP

input

Wake

18

NC

Reserve

19

GND

input

Power ground

20

STA

output

Low power indication

6.Operation command

Order

Name

Explanation

CHECK_EXIST

Detect module and SD card

It is to test if the communication with the SD card module is normal. Also, it will confirm if SD card has been inserted into the SD card module.

GET_DISK_SIZE

Check SD card capacity

Acquire information about SD card capacity and free space.

DISK_FORMAT

Format SD card

Format the SD card

GET_DIR_FIRST

Query the first directory item

Get the first directory entry in the current directory

GET_DIR_NEXT

Query next directory item

Get the next target item in the current directory

MAKE_DIR

Create directory

Create a subdirectory in the current directory

REMOVE_DIR

Delete directory

Delete a subdirectory in the current directory

ENTER_DIR

Enter directory

Enter a subdirectory in the current directory

BACK_TO_ROOT

Back to root

Go back to the root from current directory

MAKE_FILE

Create file

Create a file in the current directory

REMOVE_FILE

Delete File

Delete a file in the current directory

FILE_OPEN

Open File

Open a file in the current directory

FILE_CLOSE

Close file

Close an open file

FILE_GET_LEN

Query file length

Query the length of an open file

FILE_READ

Read file content

Read the contents of an open file (continuously read)

FILE_CLEAR

Empty file contents

Empty the contents of an open file

FILE_APPEND

Append file content

Append to the end of an open file

RENAME_DIR

Change the name of directory

Change the name of a subdirectory under the current directory

NOTICE_CUR_TIME

Update time

Update the current real time of the module

FILE_SEEK

File location

Move the current reading position of an open file

ENTER_SLEEP

Enter sleep mode

Let the module go into the power consumption state

7.Application field

Bulk SD Memory cards are supporting various equipment. No matter it is for medical instrument or sport equipment(treadmills, swing machines etc.), you can find it there. For instance, doctor need devices to record patients’ data. Therefore, you may find storage card in sphygmomanometer, blood glucose meter, blood lipid meter, and cardiomotor. Besides it, bulk SD cards 128gb are popular for Car dash camera. These are equipment in consumer market. If you use wholesale SD cards in industry, you may find it in Electronic system parameter setting, CNC machine, and Devices for data collection.

8.Development Kit

DSM-100 SD card reading and writing

DSM-100 SD card reading and writing module 51 single-chip microcomputer development boar

The development board is implemented by STC89C52, a typical microcontroller in the 8051 series, and shows how to implement large-capacity data storage on a low-profile microcontroller.

Connect the development board to the computer with a USB cable, and the computer will recognize the development board as a serial device. (If it cannot be recognized, you need to install driver)

Use the serial port debugging tool (such as HyperTerminal) on the computer, set the serial port parameters to “9600bit/s baud rate. In addition, 8 data bits, no parity, 1 stop bit”, and then you can enter the command place of the development board.

At the command place, type “help” to get help. Enter other commands to query firmware version number, query card capacity, format card, create directory, delete directory, traverse directory, create file, delete file, read file, write file, and other operations.

Provide the source code development package required for secondary development, and users can use it in their own products with a little porting.

Leave a comment

0
Back to Top
Product has been added to your cart