TOP Contributors

  1. MIKROE (2638 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 (136094 times)
  2. FAT32 Library (69395 times)
  3. Network Ethernet Library (55671 times)
  4. USB Device Library (45937 times)
  5. Network WiFi Library (41606 times)
  6. FT800 Library (40699 times)
  7. GSM click (28760 times)
  8. PID Library (26312 times)
  9. mikroSDK (25990 times)
  10. microSD click (25089 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: 25089 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

FTDI click - Example

0

This is demonstration project how FTDI click can be used to control slave microcontroller via I2C. Lower nibble of slave address is masked which enables the master to address slave using eight different addresses. Currently four addresses are implemented for different functionality.

[Learn More]

BarGraph 2 click

5

BarGraph 2 click is a 10-segment bar graph display click, which uses a high-quality, multicolor bar graph LED display. The bar graph display is a very popular device for displaying various properties, whether it be an audio level, current/voltage level, position of the encoder, or something else.

[Learn More]

DC Motor 17 click

0

DC Motor 17 Click is a compact add-on board that contains a brushed DC motor driver. This board features the TC78H660FTG, a dual H Bridge driver for one or two brushed motors that incorporate a DMOS with low on-resistance in output transistors from Toshiba Semiconductor. This IC is a PWM controlled constant-current drive with supply voltages from 2.5V to 16V and 2A of output current. It features a sense-resistor less current control architecture and VCC regulator for the internal circuit. Also offers multi-error detect functions with error detection flag output function. This Click board™ is suitable for driving DC motors, controlling the direction of the rotation, as well as brake and regulate the motor current.

[Learn More]