TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (352 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 (136736 times)
  2. FAT32 Library (69950 times)
  3. Network Ethernet Library (55941 times)
  4. USB Device Library (46266 times)
  5. Network WiFi Library (41886 times)
  6. FT800 Library (41170 times)
  7. GSM click (28983 times)
  8. PID Library (26413 times)
  9. mikroSDK (26360 times)
  10. microSD click (25376 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: 25376 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

Magneto click

1

Magneto click carries an AS5048A contactless magnetic angle position sensor. The sensing circuitry relies on the Hall Effect to detect the vector of a nearby magnetic field in a 360º two-dimensional plane parallel to the surface of the chip. AS5048A delivers precise angle measurements down to 0.05º in 14-bit resolution.

[Learn More]

Thermo 30 click

0

Thermo 30 Click is a compact add-on board that accurately measures temperature. This board features the STS32-DIS-10KS, a third-generation, high-reliability, certified digital temperature sensor from Sensirion. It is a digitally calibrated and ISO17025-certified temperature sensor with an operating temperature range of -40 to 125°C.

[Learn More]

Proximity 3 click

0

Proximity 3 click is an intelligent proximity and light sensing device, which features the VCNL4200 sensor from Vishay - high sensitivity long distance proximity sensor (PS), ambient light sensor (ALS) and 940 nm IRED, all in one small package.

[Learn More]