Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Q1) answer the following question regarding these two devices MicroSD card break

ID: 2248093 • Letter: Q

Question

Q1) answer the following question regarding these two devices

MicroSD card breakout board+

by Adafruit https://www.adafruit.com/products/254

SparkFun Level Shifting microSD Breakout https://www.sparkfun.com/products/13743

a) Locate and analyze the schematics for the two breakout boards. You can find them starting at the links above. What appears to be the major difference between the two designs? (note: you have to be more specific than a different level-shifter chip was used, and I do not care about the voltage regulator or decoupling caps – focus on the SPI lines)

b) Focusing on the DO (Data Out) signal of the SD card, what are the implications of each design as far as the ATmega644P is concerned? (hint: take a look at the ATmega644 datasheet as well as the datasheet of a typical SD card and perhaps the datasheets for 74HC4050 and TXB0104, all in the shared Box folder, and compare logic voltage levels – VOH, VOL, VIH, VIL)

Explanation / Answer

a)

The SparkFun Level Shifting microSD Breakout is quite similar to the SparkFun microSD Transflash Breakout, but with the included level shifting hardware, this board allows you to utilize a microSD card at Arduino’s SD library’s top speed on a 5V system.microSD card socket to support projects which require storing large amounts of data from Grove sensor.

Not just a simple breakout board, this microSD adapter goes the extra mile with built-in 3.3V voltage regulator and logic level conversion from 5V to 3.3V. So you can use this board with 5V and 3.3V systems

B)

Communication with an SD card can be done in one of two modes: the SD mode or the SPI mode. By default, the SD card operates in the SD mode. However, we’ll work with the SPI mode and communicate with it using the SPI protocol. Communication with the SD card is performed by sending commands to it and receiving responses from it. A valid SD card command consists of 48 bits . The leftmost two bits are the start bits which we set to (01). They are followed by a 6-bit command number and a 32-bit argument where additional information may be provided. Next, there are 7 bits containing a Cyclic Redundancy Check (CRC) code.

The CRC code is used by the SD card to verify the integrity of a command it receives. By default, the SD card ignores the CRC bits for most commands (except CMD8) unless a user requests that CRC bits be checked upon receiving every message. Sending a command to the SD card is performed in serial fashion. By default, the MOSI line is set to 1 to indicate that no message is being sent.

The process of sending a message begins with placing its mostsignificant bit on the MOSI line and then toggling the SD CLK signal from 0 to 1 and then back from 1 to 0. Then, the second bit is placed on the MOSI line and again the SD CLK signal is toggled twice. Repeating this procedure for each bit allows the SD card to receive a complete command. Once the SD card receives a command it will begin processing it. To respond to a command, the SD card requires the SD CLK signal to toggle for at least 8 cycles. Your program will have to toggle the SD CLK signal and maintain the MOSI line high while waiting for a response. The length of a response message varies depending on the command. Most of the commands get a response mostly in the form of 8-bit messages, with two exceptions where the response consists of 40 bits. To ensure the proper operation of the SD card, the SD CLK signal should have a frequency in the range of 100 to 400 kHz.