TOP Contributors

  1. MIKROE (2642 codes)
  2. Alcides Ramos (347 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136221 times)
  2. FAT32 Library (69487 times)
  3. Network Ethernet Library (55706 times)
  4. USB Device Library (45992 times)
  5. Network WiFi Library (41639 times)
  6. FT800 Library (40782 times)
  7. GSM click (28788 times)
  8. PID Library (26332 times)
  9. mikroSDK (26053 times)
  10. microSD click (25140 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

microSD click

Rating:

8

Author: MIKROE

Last Updated: 2019-06-05

Package Version: 1.0.0.1

mikroSDK Library: 1.0.0.0

Category: microSD

Downloaded: 25140 times

Followed by: 5 users

License: MIT license  

This project consists of several blocks that demonstrate various aspects of
usage of the MMC_Fat16 library.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "microSD click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "microSD click" changes.

Do you want to report abuse regarding "microSD click".

  • mikroSDK Library 2.0.0.0
  • Comments (1)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

microSd click

microSd click

Front and back view of microSD click board designed in mikroBUS form factor. mikroBUS is specially designed pinout standard with SPI, I2C, Analog, UART, Interrupt, PWM, Reset and Power supply pins.

View full image

Library Description

The library covers all the necessary functions for the usage of the microSD Click board. It holds card detection function.

Key functions:

  • uint8_t microsd_cardDetection() - Function checks if the user has inserted the memory card.

Examples description

The application is composed of the three sections :

  • System Initialization - Initializes SPI module, LOG and GPIO structures, sets CS pin as output and AN pin as input.
  • Application Initialization - Initalizes SPI driver and makes an initial log.
  • Application Task - This is an example that shows the capabilities of the microSD click board by reading CID and CSD values of a memory card and logging them on USART terminal.
void applicationTask()
{
    mikrobus_logWrite( "", _LOG_LINE );
    mikrobus_logWrite( "________________________", _LOG_LINE );
    mikrobus_logWrite( "  Begin demonstration!  ", _LOG_LINE );
    mikrobus_logWrite( "", _LOG_LINE );

    mikrobus_logWrite( "  Insert  microSD  Card ", _LOG_LINE );
    mikrobus_logWrite( "------------------------", _LOG_LINE );

    if( microsd_cardDetection() )
    {
        mikrobus_logWrite( "Memory card not detected", _LOG_LINE );
        mikrobus_logWrite( "------------------------", _LOG_LINE );
    }
    else
    {
        mikrobus_logWrite( " Memory  card  detected ", _LOG_LINE );
        mikrobus_logWrite( "------------------------", _LOG_LINE );
        mmcErr = Mmc_Init();
        if( mmcErr == 0 )
        {
            mikrobus_logWrite( "     MMC  Init-OK     ", _LOG_LINE );
            mikrobus_logWrite( "------------------------", _LOG_LINE );
            mmcErr = Mmc_Read_Cid( regVal );
            if( mmcErr == 0 )
            {
                mikrobus_logWrite( "CID : ", _LOG_TEXT );
                for( i = 0; i <= 15; i++ )
                {
                    IntToHex( regVal[ i ], logTxt );
                    mikrobus_logWrite( logTxt, _LOG_TEXT );
                }
            mikrobus_logWrite( "", _LOG_LINE );
            mikrobus_logWrite( "------------------------", _LOG_LINE );
            }
            else
            {
                mikrobus_logWrite( "    CID-error    ", _LOG_LINE );
                mikrobus_logWrite( "------------------------", _LOG_LINE );
            }
            mmcErr = Mmc_Read_Csd( regVal );
            if(mmcErr == 0)
            {
                mikrobus_logWrite("CSD : ", _LOG_TEXT);
                for( i=0; i <= 15; i++ )
                {
                    IntToHex( regVal[ i ], logTxt  );
                    mikrobus_logWrite( logTxt, _LOG_TEXT );
                }
                mikrobus_logWrite("", _LOG_LINE );
                mikrobus_logWrite( "------------------------", _LOG_LINE );
            }
            else
            {
                mikrobus_logWrite("    CSD-error    ", _LOG_LINE );
                mikrobus_logWrite( "------------------------", _LOG_LINE );
            }
         }
        else
        {
            mikrobus_logWrite( "   MMC  Init-error   ", _LOG_LINE );
            mikrobus_logWrite( "------------------------", _LOG_LINE );
        }

    mikrobus_logWrite( "  Demonstration  over!  ", _LOG_LINE );
    mikrobus_logWrite( "________________________", _LOG_LINE );
    mikrobus_logWrite( "", _LOG_LINE );
    Delay_ms( 5000 );
}

Additional Functions :

  • Mmc_Init() - Initializes MMC through hardware SPI interface.
  • Mmc_Read_Cid( regVal ) - The function reads 16-byte CID register.
  • Mmc_Read_Csd( regVal ) - The function reads 16-byte CSD register.

Other mikroE Libraries used in the example:

  • SPI
  • Mmc
  • Mmc_FAT16
  • UART
  • Conversions

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

microSD click board schematics

microSD click board schematics

Board is designed to use 3.3V power supply only. On board ferrite voltage supply filter ensures stable operation.

View full image

ALSO FROM THIS AUTHOR

Thermo 16 click

0

Thermo 16 Click is a Click board equipped with the sensor IC, which can measure temperature measurements between -40°C and +150°C so that the temperature measurement data can be processed by the host MCU.

[Learn More]

STSPIN820 Click

5

STSPIN820 click is a stepper motor driver with the PWM current control, selectable microstepping up to 256 microsteps, and a wide voltage range.

[Learn More]

RTC 9 click

0

RTC 9 Click is a real-time clock module that has an extremely low power consumption, allowing it to be used with a single button cell battery, for an extended period of time. This board features the M41T82, real-time clock (RTC) with battery switchover, from ST Microelectronics.

[Learn More]