Hot answers tagged

43

I work for a company that used to be a member of the SD association, we are familiar with the 2.0 (SDHC) spec. The SD card spec has NO entry for wear leveling. That is completely dependent on the SD manufacturer to handle that if they so choose. We have seen that some likely do, while others very much do not (beware the super cheap knock-off SD cards). ...


29

The original electronic nonvolatile memory is based on ferrite cores. While it's relatively easy to magnetize such a core in one direction or the other to store a one or a zero, it takes some fairly sophisticated circuitry to read it back reliably. Modern nonvolatile chips rely on charge storage, but in order to make this work, you need to be able to create ...


23

It's true! MicroSD cards contain a NAND flash chip bonded to an (ARM) microcontroller encapsulated in some black plastic. http://www.bunniestudios.com/blog/?p=898 explains. At the end of the follow-up post http://www.bunniestudios.com/blog/?p=918 Bunnie posits integrating the controller probably costs less than testing the flash ahead of time. Quoting ...


20

Google translate on your phone can do this: Parts prohibited area (部品搭軾禁止エリア) Pattern prohibited area (パターン禁止エリア) Soldering prohibited area (半田付け禁止エリア)


19

Yes, SD/MMC cards have controllers that do wear leveling. If they didn't, you could destroy one in a matter of minutes with the wrong write patterns. That's actually a problem for some embedded projects. There's absolutely no way (apparently) to know what sectors might be wear leveled at any time, so a power cycle at the wrong time can destroy data anywhere ...


19

Disclaimer: I am clueless about EE, but read Japanese well enough to look this up. Black box: 部品搭載禁止エリア = "components/parts-loading prohibited area" (don't put stuff here, I assume). Diagonal lines: パターン禁止エリア = "Pattern prohibited area" (I don't know what "pattern" refers to in this context, but don't do it there). Diamond box: 半田付け禁止エリア = "solder-...


14

All I want to get are some awesome holiday pictures back. Lets be frank. They are not worth $1M to you are they. For that sort of money you could go on that holiday again a few times and recapture the same photos or something equally awesome. I would have thought some talented person somewhere would be able to patch up the area of the chip The ...


14

In this micro-SD socket the spring contacts are located at the bottom of footprint, and during card insertion they may touch the PCB surface. Therefore there is a chance that PCB protective layer will be compromised over time, and the contacts will touch traces, if any. Therefore the manufacturer recommends to leave the shaded area without routing any signal ...


13

I've tested many card with my 1.5Kg rare earth magnet, so I can bet that magnets have no effects on flash cards or USB pen drives :-)


12

According to this page SD cards drive and or release the DO line synchronously with the sclk line: In the SPI bus, each slave device is selected with separated CS signals, and plural devices can be attached to an SPI bus. Generic SPI slave device drives/releases its DO signal by CS signal asynchronously to share an SPI bus. However MMC/SDC drives/...


12

Any type of SD card using any type of conventional NAND flash memory is going to have to use some type of sector virtualization, since no conventional NAND flash device can support erasure of individual 512-byte sectors, and no conventional NAND flash device of significant size would be able to yield performance that was within an order of magnitude of being ...


12

There are two modes of communicating with an SD card: SD mode (sometimes incorrectly called SDIO), and SPI mode (Serial Peripheral Interface). (SDIO actually refers to a Secure Digital Input Output card which is a superset of the SD card spec, and supports various I/O devices in addition to memory.) An SD card comes up by default in 1-bit SD mode, but can ...


11

Never, never, never put file I/O in an interrupt routine - unless it is the only routine to do file I/O. And then still don't do it! An interrupt can interrupt anything: including file I/O. And interrupts should be quick, quick, quick! File I/O just isn't. You need to use the tickers to store the data in memory buffers, then write the data inside loop().


10

It turns out that I was reading the MBR, which is located at the address 0 on the SD card. To find the location of the boot sector, one needs to read the appropriate entry in the MBR. The entries start at the address 0x01be and are 16 bytes each. The point of interest in the entry lies at the offset 0x08, is 4 bytes long and is called an LBA. [Wikipedia] To ...


10

For venerable floppies, this statement holds true. We placed a 99-cent magnet on a 3.5-inch floppy for a few seconds. The magnet stuck to the disk and ruined its data. Fortunately, most modern storage devices, such as SD and CompactFlash memory cards, are immune to magnetic fields. "There's nothing magnetic in flash memory, so [a magnet] won't do anything," ...


10

Looking at the drawing, I would guess that DETECT and SWITCH are the two terminals of the switch which detects the presence of an SD-card. This allows for more flexibility in circuit design


9

The first part is NOR flash. The second is NAND flash, it is cheaper to produce. Learn more at Wikipedia here. It isn't the interface that costs more, it is the type of flash that is the main driver. Plus there isn't much competition in large SPI flash. I suspect that's the main driver at this density. Additionally your are comparing a proper ...


9

IC1 has six sections (A-F) although only 4 are used the circuit. In general it is not allowed to leave inputs of CMOS devices unconnected so the two at the bottom show what to do with the inputs, connect them to ground. Section E also shows how the connections for the power supply pins of the entire device. The outputs are not used and so are shown as ...


8

So it depends on what you want to do. As a general rule: if you're willing to run slowly enough, you can do whatever the heck you want. On microcontrollers (like a PIC or an ATMega processor (not including PIC32 or Atmel's ARM processors)) you normally have a Harvard Architecture which means that code and data are stored in different parts of memory and ...


8

Make a circuit that flicks a mechanical switch eg. useless box. The circuit would need to be powered up to change/read state but it would keep it in between.


8

I wouldn't recommend it. So, here's my theory: SD card contacting depends on spring contacts in the SD card holder. If your potting compound creeps into the gap between SD card and holder contacts before it hardens, it's game over. But even if it's too viscous to creep in before it sets, chances are you now have removed all springiness from the contacts. ...


8

The cheapest solution from a hardware point of view would be to use a MCU that includes a USB interface (there are a lot of them in the PIC32MK/MZ/MX ranges), and just make the MCU responsible for all the communication to/from both the SD card and the USB interface. Implement the Mass Storage USB device class (or, alternatively, the Media Transfer Protocol ...


7

Assuming you are talking about ordinary magnets, no. If you are talking about the field strengths found in an MRI machine or a fusion research device, things start to get weird - there's the hall effect, potential for induced current due to movement or field changes, even potential for mechanical distortion and having parts ripped out of the assembly.


7

Sandisk have a white paper that explains the wear levelling logic in their cards, and goes on to give estimates of the card's life under a number of scenarios. Executive summary: unless you are hammering the card non-stop, it will last decades.


7

Okay, I figured it out actually. I should have googled a bit deeper. It turns out that SD cards don't act exactly like SPI devices when sharing a bus according to How to Use MMC/SDC: In the SPI bus, each slave device is selected with separated CS signals, and plural devices can be attached to an SPI bus. Generic SPI slave device drives/releases its DO ...


7

You didn't mention which PIC you are using, but assuming it is one of the smaller ones such as the PIC16 then with it's limited RAM (99% of PIC16's have no more than 1K of RAM) it would be impossible to implement even a FAT16 file system since multiple 512 byte buffers are needed. (Microchip has a useful library to implement a FAT16/FAT32 file system but it ...


7

I have soldered wires direct to an SD card before now (I needed an SD card connected in an emergency and had no suitable socket for it). It worked fine, but I certainly wouldn't choose it, or anything like it, for production. Firstly neither the contacts, nor the housing, are designed for soldering. Yes, you can solder them, but the plastic has a low ...


7

The nets that are named 'CLK', 'DO', etc. are connected, just the wires aren't drawn for the sake of clarity. Now, IC1E and IC1F that are not connected to anything are unused portions of IC1, which is a hex buffer chip. One chip gives you 6 independent buffers, but in this case only 4 of them are used, so the last two have their input grounded and output ...


7

In your code you have the following suspect line: for (int loop_bit=7; ((loop_bit < 8)||(loop_bit < 254)); loop_bit--){ ... } The key problem with this is that as loop_bit is an 'int'. In avr-gcc this is a 16bit signed data type. You have a loop condition which is loop_bit < 254 (and the redundant loop_bit < 8). As such if you keep ...


Only top voted, non community-wiki answers of a minimum length are eligible