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 (136217 times)
  2. FAT32 Library (69478 times)
  3. Network Ethernet Library (55705 times)
  4. USB Device Library (45989 times)
  5. Network WiFi Library (41638 times)
  6. FT800 Library (40780 times)
  7. GSM click (28788 times)
  8. PID Library (26327 times)
  9. mikroSDK (26051 times)
  10. microSD click (25139 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: 25139 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

RGB Driver click demo example

0

This example is made to demonstrate the operation of the RGB Driver click.

[Learn More]

RS485 Isolator 2 click

0

RS485 Isolator 2 Click features ADM2867E a 5.7 kV rms signal and power isolated full duplex RS-485 transceiver.

[Learn More]

TILT-n-SHAKE click

5

TILT-n-SHAKE click carries Freescale’s MMA8491Q IC. It’s a multifunctional 3-axis digital accelerometer that can also be configured as a 45-degree Tilt sensor. As an accelerometer, it communicates with the target MCU through mikroBUS™ I2C pins (SCL, SDA).

[Learn More]