MMC Library Interface With PicMicroController (MikroC)
What you'll learn
- MMC Library
Requirements
- MikroeC Program
- Protues Program
Description
Multi Media Card Library
The Multi Media Card (MMC) is a Flash memory card standard. MMC cards are currently available in sizes up to and including 32 GB and are used in cellular phones, digital audio players, digital cameras and PDA’s.
mikroC PRO for PIC provides a library for accessing data on Multi Media Card via SPI communication. This library also supports SD (Secure Digital) and high capacity SDHC (Secure Digital High Capacity) memory cards .
Secure Digital Card
Secure Digital (SD) is a Flash memory card standard, based on the older Multi Media Card (MMC) format.
SD cards are currently available in sizes of up to and including 2 GB, and are used in digital cameras, digital camcorders, handheld computers, media players, mobile phones, GPS receivers, video games and PDAs.
Secure Digital High Capacity Card
SDHC (Secure Digital High Capacity, SD 2.0) is an extension of the SD standard which increases card's storage capacity up to 32 GB by using sector addressing instead of byte addressing in the previous SD standard.
SDHC cards share the same physical and electrical form factor as older (SD 1.x) cards, allowing SDHC-devices to support both newer SDHC cards and older SD-cards. The current standard limits the maximum capacity of an SDHC card to 32 GB.
Important :
Routines for file handling can be used only with FAT16 file system.
Library functions create and read files from the root directory only.
Library functions populate both FAT1 and FAT2 tables when writing to files, but the file data is being read from the FAT1 table only; i.e. there is no recovery if the FAT1 table gets corrupted.
If MMC/SD card has Master Boot Record (MBR), the library will work with the first available primary (logical) partition that has non-zero size. If MMC/SD card has Volume Boot Record (i.e. there is only one logical partition and no MBRs), the library works with entire card as a single partition. For more information on MBR, physical and logical drives, primary/secondary partitions and partition tables, please consult other resources, e.g. Wikipedia and similar.
Before write operation, make sure you don’t overwrite boot or FAT sector as it could make your card on PC or digital camera unreadable. Drive mapping tools, such as Winhex, can be of a great assistance.
Library uses SPI module for communication. The user must initialize the appropriate SPI module before using the MMC Library.
For MCUs with multiple SPI modules it is possible to initialize all of them and then switch by using the SPI_Set_Active() function. See the SPI Library functions.
MMC FAT 16 Library works with PIC18 family only.
The SPI module has to be initialized through SPIx_Init_Advanced routine with the following parameters:
SPI Master
Primary prescaler 64
Data sampled in the middle of data output time
Clock idle low
Serial output data changes on transition form low to high edge
Tip : Once the MMC/SD card is initialized, SPI module can be reinitialized at higher a speed. See the Mmc_Init and Mmc_Fat_Init routines.
Who this course is for:
- Any Person Using MMC Library In Electronics Project
Course content
- Preview01:06
- Preview01:02
- Preview00:50
- Preview01:14
- Preview03:27
- Preview01:05
- Preview03:00
- 01:568- Explain Mmc_Read_Sector() Routines
- 02:139- Explain Mmc_Write_Sector() Routine
- 01:4710- Explain Mmc_Read_Cid() Routine
- 01:1711- Explain Mmc_Read_Csd() Routine
- 01:4912- Explain Mmc_Multi_Read_Start() Routine
- 01:3613- Explain Mmc_Multi_Read_Sector() Routine
- 00:4514- Explain Mmc_Multi_Read_Stop() Routine
- 06:1615- Explain Mmc_Fat_Init() Routine
- 02:4016- Explain Mmc_Fat_QuickFormat() Routine
Instructor
I'm a full-stack web developer, I have more than +14 years of experience in the software development industry, especially in web development. I have very strong skills both in Front-end and Back-end development and below is a summary of my skills:
Programming Languages :
PHP, Swift, SQL, HTML5, CSS3, Javascript, JSON, Ajax
Frameworks/CMS/Libraries:
- Codeigniter 2 & 3, Laravel +5
- Wordpress +4, Drupal 7
- Bootstrap/jQuery/VueJs/axios
API Integration :
- Payment Gateway: Braintree, Paymill, Stripe
- Social: Facebook, Twitter, LinkedIn, Google Map, YouTube, Dropbox, Instagram
- Telecommunication: Twilio
Hosting & Server Administration :
- Linux: Centos, Ubuntu (LEMP, LAMP)
- Shared Hosting
Databases:
- MySQL
- Redis
Familiar with:
- Amazon AWS, DigitalOcean
- JIRA, Redmine, Trello, OpenProject
- Git, bitbucket, Github
- Automated deployment (Continuous Integration/Deployment)
Personal Qualities:
- Ability to understand business requirements and translate them into technical requirements
- Passion for quality and attention to detail
- Focus on moving the business forward.