• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Microcontrollers » MSP430™ Microcontrollers » MSP430 Ultra-Low Power 16-bit Microcontroller Forum » A question about msp430f2274 interfaces with SD card
Share
MSP430™ Microcontrollers
  • Forum
  • Announcements
  • E2E Wiki
Options
  • Subscribe via RSS
MSP430 Resources
  • MSP430 Product Folder
  • MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
  • MSP430 Getting Started Guide
  • MSP430 Microcontroller Projects
  • More Resources >
  • Forums

    A question about msp430f2274 interfaces with SD card

    This question is answered
    ForzaJuve
    Posted by ForzaJuve
    on Nov 04 2009 02:39 AM
    Intellectual275 points

    HI,

         I am using msp430f2274 to do my project, now I want the microcontroller to interface with a SD card, simply is just to write something into the SD card.

         I downloaded an example code of MMC from TI, which was slac128b(if I am not wrong), and I want to modify the sample code. But I have no idea how to modify it and I dont even know whether the microcontroller can detect the SD card.

         I connected the SD card and msp430 like this:

          1------->P3.0(UCB0STE)

          2------->P3.2(UCB0SOMI)

          3------->GND

          4------->VCC

          5------->P3.3(UCB0CLK)

          6------->GND

          7------->P3.1(UCB0SIMO)

           8 and 9 are not connected

           GND and VCC I used the port on the board, should I use an external power supply for SD card?

           And is it ok for 3 and 6 share the same GND?

    anyone know how to interface with SD card please help me! Thanks !

    MSP430 sd card
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    All Replies
    • BrandonAzbell
      Posted by BrandonAzbell
      on Nov 12 2009 23:06 PM
      Guru54850 points

      I suspect the writes to P1OUT are to provide an observable indicator of an error on read.

      What value are you getting in the buffer[] array?  I would suggest looking at the signals to the SD card and determine if you are getting expected activity on the mmcWriteSector() and mmcReadSector().

      Brandon

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • ForzaJuve
      Posted by ForzaJuve
      on Nov 12 2009 23:32 PM
      Intellectual275 points

      // Write Data to MMC 
        for (i = 0; i < 512; i++) buffer[i] = i;
        mmcWriteSector(0, buffer);                // write a 512 Byte big block beginning at the (aligned) adress

        for (i = 0; i < 512; i++) buffer[i] = i+64;
        mmcWriteSector(1, buffer);                // write a 512 Byte big block beginning at the (aligned) adress

        mmcReadSector(0, buffer);                 // read a size Byte big block beginning at the address.
        for (i = 0; i < 512; i++) if(buffer[i] != (unsigned char)i) P1OUT |= 0x04;

        mmcReadSector(1, buffer);                 // read a size Byte big block beginning at the address.
        for (i = 0; i < 512; i++) if(buffer[i] != (unsigned char)(i+64)) P1OUT |= 0x08;

      When I use mouse to see the content of buffer[ ] array in above code, I can see the expected results

      however, if I point to the buffer[ ] where I defined it at the beginning of this program ( unsigned char buffer[512] ;), it shows content error.

      And could you please also check out another question?

      http://e2e.ti.com/forums/p/12466/48541.aspx#48541

      Thank you very much.

      regards.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Antonio Salazar
      Posted by Antonio Salazar
      on May 28 2010 10:01 AM
      Prodigy10 points

      Hi, I am attempting the same interfase (SD card / ez430 module), would it be possible to gain access to the code you used?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Austin Fang
      Posted by Austin Fang
      on Feb 22 2012 15:45 PM
      Prodigy10 points

      Hi, were you able to get the code working?  If so, can you please tell me what hardware you used and possibly provide the source code?

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Ben Peng
      Posted by Ben Peng
      on Jun 19 2012 15:18 PM
      Prodigy20 points

      Hi, 

      I am also trying to program EZ430-RF2500 with SD card. Is it necessary to include a card detect pin? 

      If it does, is it the reason chip select pin shared with cc2500 so its better to implement another detector to enable SPI communication?

      Is it possible to provide the source code? Thank you very much

      Ben

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    • Jens-Michael Gross
      Posted by Jens-Michael Gross
      on Jun 20 2012 12:14 PM
      Guru140135 points

      Ben Peng
      If it does, is it the reason chip select pin shared with cc2500

      On SPI, each and every SPI slave has to have its own, unique and dedicated chip select signal. Except if several identical (and specifically designed for it) devices are chained.

      A card detect pin is not really necessary, but it helps detecting whether a card has been inserted instead of either constantly trying to initialize one or trying once at startup and then never again.

      _____________________________________
      Before posting bug reports or ask for help, do at least quick scan over this article. It applies to any kind of problem reporting. On any forum. And/or look here.
      If you cannot discuss your problem in the public, feel free to start a private conversation: click on my name and then 'start conversation'. But please do so only if you really cannot do it in a public thread, as I usually read all threads. And I prefer to answer where others can profit from it (or contribute to it) too.

      Report Abuse
      • Reply
      You have posted to a forum that requires a moderator to approve posts before they are publicly available.
    12
    TI E2E™ Community
    • Support Forums
    • Blogs
    • Videos
    • Groups
    • Site Support & Feedback
    • Settings
    TI E2E™ Community Groups
    • TI University Program
    • Make the Switch
    • Microcontroller Projects
    • Motor Drive & Control
    Other Communities
    • Deyisupport
    • Designsomething.org
    • beagleboard.org
    • TI on Element 14
    • TI on TechXchangeSM
    Other Technical & Support Resources
    • WEBENCH® Design Center
    • Product Information Centers
    • Technical Documents
    • TI Design Network
    • TI Technical Articles
    • TI Training

    All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

    Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

    Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
    TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

    TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
    embedded processors, along with software, tools and the industry’s largest sales/support staff.

    © Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
    Trademarks | Privacy Policy | Terms of Use