►Designing target platform


This tutorial was specifically written around the microcontroller I am using, which is the ST upsd3334D microcontroller. Since it is fundamentally an 8052, you should be able to adapt this tutorial to your specific microcontroller; however, some of the Special Function Registers will probably be different. The upsd3334D is unique in that it is not only an 8052, but also a CPLD(Complex Programmable Logic Device) in the same part. The 8052 portion of the part is 3.3v and the CPLD portion is 5.0v. The hardware interface to the SD card is simple. The signals can connect directly to the 3.3v pins on the 8052, but I added 30 ohm resistors to reduce signal bounce.


MMC Connection to controller

In this tutorial, the SD memory card is attached to the 3.3v section of the micro, so no voltage shifting is necessary.

MMC Connection to controller

Remember: The SD memory card has a limited voltage range, so ALL signals to and from it are a maximum of 3.3v. If you connect 5.0v signals to the SD memory card, you might damage it.



Additionally, I am using the Keil development PK51 suite, which consists of the IDE (Integrated Development Environment), the C51 compiler, the AX51 assembler, and the LX51 link-loader. The version is 8.17a, but I believe any version should work.

If you would like to read more about CPLD’s, you can visit this link: http://en.wikipedia.org/wiki/CPLD

If you would like to read more about the processor I am using, you can visit this link: http://www.keil.com/dd/chip/3639.htm


Tutorial Index
Interface to Chan’s Library of functions SD Card Initialization
Target development platform Reading and Writing a single sector
Setting up the SPI port during startup.A51 Working with diskio.c
Global type definitions and variables Pulling it all together
Basic SPI function Index Page

Downloads

Comments

AntoniaRoons
Fri Apr 19 2024, 09:59 pm
carpinteyrowrl
Fri Apr 19 2024, 02:51 pm
DonaldJAX
Fri Apr 19 2024, 01:08 pm
Lewisuhakeply
Thu Apr 18 2024, 06:00 pm
Darrellciz
Thu Apr 18 2024, 11:07 am
Charlessber
Thu Apr 18 2024, 09:29 am
BartonSem
Thu Apr 18 2024, 04:56 am
DonaldKnown
Thu Apr 18 2024, 12:24 am