# Peripheral Hardware Examples

## Controlling SD Cards

The 'Secure Digital' or 'SD Card' mass storage standard, while fundamentally a proprietary standard, and certainly nowhere near as open as say CompactFlash, has nonetheless become common in DIY and open-source hardware, providing flash memory storage (as of 2010) in the small numbers of gigabytes for perhaps a few dollars per gigabyte. As of 0.9.17, the SFB core software has had support for performing raw disk operations -- no file system, just reading and writing blocks -- on SD cards.

- Detect an SD card and report its size

- Benchmark SD card reading and writing

- Buffered I/O to SD card via packets

## Controlling I2C devices

The 'Inter-Integrated Circuit' ('I2C') bus, developed by Phillips, is a widely-used standard for slow-to-moderate speed device communication. As of 0.9.20, the SFB core software has had support, in some ways limited, but often usable, for communicating with I2C devices. Limitations include that the IXM can only be an 'I2C master' even though the hardware is capable of being a slave, and only certain kinds of I2C bus transactions are supported. If there is enough interest, it could be possible to expose lower-level I2C functions, making the code more general, but so far this codebase leans somewhat towards simplicity over flexibility.

This code is based upon code written by Sam Bayless, modified lightly, and extended slightly, for inclusion in the SFB core.

NOTE: ONLY A FEW I2C DEVICES HAVE BEEN TESTED WITH THIS CODE SO FAR! YOUR MILEAGE MAY VARY!

- Talk to an I2C DAC

- Talk to an I2C DAC, faster

- Talk to an I2C EEPROM