Hot answers tagged

43

Hm, my usual suspicion would be that your read access goes through a file system and that updates something, e.g. a file access time, in the file system, but that doesn't seem to be the case here. Next thing I'm guessing: You're experiencing read disturb, a phenomenon where reading the same cell over and over again charges neighboring memory cells ever so ...


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 ...


20

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


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-...


15

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 ...


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 ...


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

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

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

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.


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

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 ...


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

are there known risks and common problems like this writing directly to the card and avoiding an FS? (like block alignment) Generally no, using the card as a simple block device is perfectly safe. However, without an FS layer, you're responsible for what you do yourself. So if you have a glitch in your code, it may affect the SD card more. do the larger ...


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

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

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 ...


7

I've finally manage to implement low-level drivers and they seem to work nicely. I'm sharing source code of my implementation in case somebody else gets stuck at the same part that I was.


7

Seeing this I thought that surely the Official, Authentic Nintendo Memory Cards were just plain SD cards in a proprietary housing. They aren't. The Nintendo memory cards are serial flash devices, which are accessed over SPI. SD cards support an SPI mode, so with appropriate wiring and software, they can be accessed by a GameCube. However, the converse is ...


6

If you want the simplicity of an SD-compatible interface, you can get what is essentially an SD card on a chip: http://www.samsung.com/global/business/semiconductor/product/flash-emmc/overview


6

A simple solution would be a micro controller such as a PIC12F635 which is available in an 8-pin DIP or smaller, and has a built-in clock and brown-out reset circuit (the latter is important to maintain the integrity of the EEPROM nonvolatile storage). The code required is not much, a good starter project. The only external parts required would be a ...


6

Pure electronics won't make a permamnent memory cell, but charge in a capacitor can approach it (will need regular refreshing). EEPROM/Flash memory extends this requirement to 10's of years, so for practical purposes it is called permanent. But this is not something you reach do with ordinary components. Real permanent memory uses some sort of physical bi-...


6

A fuse. It might be annoying to replace often, so you could upgrade to a breaker.


6

If the data is really important, you should use a modern checksumming CoW (copy-on-write) file system like btrfs or ZFS. A recent kernel+btrfs can do "raid" on a single device, storing the data twice with checksumming to determine if one block is damaged, and repair from the (hopefully correct) copy if it happens. Copy-on-write guarantees that data is never ...


6

SD and micro-SD cards are designed to be handled by end users; as such, they should be at least reasonably resistant to ESD damage. I wouldn't go around zapping them on purpose, but you shouldn't need any special protection to work with them.


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