cancel
Showing results for 
Search instead for 
Did you mean: 

How to interface uSD card and lcd screen on STM3210c

moh6240235
Associate

Posted on July 13, 2011 at 09:53

Hi,

I want to interface microSD card and LCD screen. So that I can

display the pictures stored in the microSD card to the LCD screen. but i can't understand how to do that.

Thanks for any help,

Dee

12 REPLIES 12
Andrew Neil
Evangelist III
Posted on July 13, 2011 at 10:35

As the old joke goes:

Q: How can you eat a whole elephant?

A: One bite at a time!

Never try to solve any problem as one big, monolithic blob!

Your first step in any  design should always be to identify the distinct functions, and partition your design into sub-systems.

In your case, it should be fairly obvious that the SD Card and the LCD screen are distinct sub-systems...

There is plenty of information - including plenty of examples - of using SD Cards with microcontrollers in general and the STM32 in particular:

http://www.lmgtfy.com/?q=sd-card+microcontroller

http://www.lmgtfy.com/?q=sd-card+STM32

Interfacing the LCD screen will depend on the particular screen in question - but, again, this is a very common task with plenty of information available.

General approach for interfacing anything to anything else: 

http://www.8052.com/forum/read/160143

rosarium
Associate II
Posted on July 13, 2011 at 12:15

For SD card you have to only use SPI to interface as STM3210-C does not have SDIO interface.

For LCD you have to see the interface available in LCD. Any way if you are using STM3210C SPI will be good option to interface.

Also you will need a file system lib to read files form the SD card. EFSL and FAT_FS_ELM are two free file system lib which you can integrate with STM32.

rosarium
Associate II
Posted on July 13, 2011 at 12:19

There is an application from ST which solves your problem. STEVAL-CCM001V2.

UM is :

http://www.st.com/stonline/products/literature/um/16844.pdf

I hope it will help.

Andrew Neil
Evangelist III
Posted on July 13, 2011 at 12:23

''you will need a file system lib to read files from the SD card.''

 

 

But you don't need a file system if you don't want to have files on the SD card; ie, if you just want to do direct ''raw'' sector access on the card...

rosarium
Associate II
Posted on July 13, 2011 at 12:27

''But you don't need a file system if you don't want to have files on the SD card; ie, if you just want to do direct ''raw'' sector access on the card.''

 

 

yes this could be one option .. But for that you have to play with LA in SD card.

 But once you integrate a file system file handling will be easier..

antoniocorregedor
Associate II
Posted on March 24, 2012 at 18:31

Good day,

I am about to implement something very similar to what you have stated in this post i.e. I am using the LCD screen and micro SD card for a certain application.  At this point I have my LCD screen working and was wondering if you could share your code for reading (and writing) to the SD card to save me some time in my development.

I realise that I have to use SPI as SDIO is not supported on this development board, and I am at the point where I can detect that a micro SD card has been plugged in.  I am now in need of the code to write and read from the SD card.

Thanks in advance for your help.

Andrew Neil
Evangelist III
Posted on March 24, 2012 at 20:05

It says,

''From: Kersten

 

Posted: Sunday, March 04, 2012 7:27 PM''

But the style (and the references) looks very much like mine - so what's going on here, then?!

antoniocorregedor
Associate II
Posted on March 24, 2012 at 20:58

Update:

I have successfully been able to read and write to the SD card by using the ''SD_WriteBlock'' function and the ''SD_ReadBlock'' funtion; and display the information on the LCD screen.  However, I would still appreciate if someone has a piece of example code for me that can be easily integrated with the STM3210C to allow other functions (such as a FAT filesystem) to be implemented.

Andrew Neil
Evangelist III
Posted on March 24, 2012 at 22:37

http://elm-chan.org/fsw/ff/00index_e.html