LPC1768 - Help - Interfacing

Discussion in 'Embedded Systems and Microcontrollers' started by sriram16, Dec 17, 2015.

  1. sriram16

    Thread Starter New Member

    Dec 17, 2015
    3
    1
    Hello everyone ,
    My name is Sriram. I am a engineering student. I have been wanting to interface a Micro SD card using LPC1768 micro-controller , I have tried learning to use SPI protocol but wasn't able to. If anybody could provide me any suggestions or any material on how to go forward with following would be very helpful for me:
    1. Using Spi Protocol in brief with an example
    2. Interfacing a SD card using LPC 1768
    3. Take a image file from the SD card and view it on your TFT.

    Thank you very much for passing by, If you could please ask someone and let me know would be very much appreciated.

    Thank You
     
    RRITESH KAKKAR likes this.
  2. sailorjoe

    Member

    Jun 4, 2013
    361
    63
    Sriram, this should not be too complicated and all the info you need is on line. Search for "Micro SD card interface" and you'll see articles and schematics aplenty for SPI connections. Your LPC has a built in SPI interface circuit, but you need to make sure your voltages match up. Then you'll need to write code to get the data in and out. Again, there are lots of coding examples available, but these are only useful as starting points. You'll need to integrate what you learn into your application. Does this help?
     
  3. sriram16

    Thread Starter New Member

    Dec 17, 2015
    3
    1
    Hey Sailorjoe , Thank you for replying. Yes was helpful , I finally got an example of SPI but still didnt find any reference interfacing an SD . What I mean by Interfacing, i want to take a image from the SD card and do certain operations on it, then view it on the TFT module



    And guys
    http://exploreembedded.com/wiki/LPC1768:_SPI_Programming#Send_Data (This link shows you what all you need to know about SPI)
    http://www.socialledge.com/sjsu/index.php?title=Embedded_System_Tutorial_SPI (this link gives you an example)
     
  4. sailorjoe

    Member

    Jun 4, 2013
    361
    63
  5. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    4,887
    1,015
    Take a look at this

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

    I think it is written for the Pic but you might be able to get it to work for you with a little modification.
     
  6. sriram16

    Thread Starter New Member

    Dec 17, 2015
    3
    1
    @sailorjoe My controller has an inbuilt memory card slot.
    @spinnaker Yes its for PIC and I think those are built in functions.
     
  7. sailorjoe

    Member

    Jun 4, 2013
    361
    63
    OK, Sriram, let me make sure I understand your original question. You have an LPC1768 controller with a built in micro SD card slot. So the interconnect is all done. Maybe what you really need now is software to access your SD card to store and retrieve files. That's not really an SPI protocol issue. SPI is more of an electrical interconnect and data transfer protocol, but it doesn't tell you anything about file storage and retrieval. That's the job of an operating system, or more basically, a layered software package that goes from device driver up to a file storage management system. Maybe this article can explain it more completely and clearly. http://siwawi.bauing.uni-kl.de/avr_projects/arm_projects/arm_memcards/

    If this is going the wrong way, please try to clarify.
     
Loading...