TOP Contributors

  1. MIKROE (2660 codes)
  2. Alcides Ramos (356 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 (137015 times)
  2. FAT32 Library (70142 times)
  3. Network Ethernet Library (56029 times)
  4. USB Device Library (46353 times)
  5. Network WiFi Library (41968 times)
  6. FT800 Library (41295 times)
  7. GSM click (29061 times)
  8. mikroSDK (26497 times)
  9. PID Library (26452 times)
  10. microSD click (25423 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: 25423 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

RTC 5 click

5

RTC5 click carries MCP79510, a real-time clock/calendar with an SPI interface. The example sets and reads the time, and displays it on the Lcd.

[Learn More]

AC Current click

6

AC Current click can measure alternating currents up to 30A and it features the MCP3201 ADC (analog to digital) converter and the MCP607 CMOS Op Amp, both from Microchip. The click is designed to run on either 3.3V or 5V power supply. It communicates with the target MCU over an SPI interface, and the AN pin on the mikroBUS line.

[Learn More]

I2C isolator click

0

I2C Isolator click carries ISO1540, a low-power, bidirectional isolator compatible with I2C interfaces. On the board, the Texas Instruments chip is connected to two sets of I2C pins, one on the mikroBUS connector (SDA, SCL), the other on the upper edge of the board (SCL2, SDL2).

[Learn More]