DataFlash
Encyclopedia
DataFlash is a low pin-count serial interface for flash memory
Flash memory
Flash memory is a non-volatile computer storage chip that can be electrically erased and reprogrammed. It was developed from EEPROM and must be erased in fairly large blocks before these can be rewritten with new data...

. It is an Atmel
Atmel
Atmel Corporation is a manufacturer of semiconductors, founded in 1984. Its focus is on system-level solutions built around flash microcontrollers...

 proprietary interface, compatible with the SPI standard
Serial Peripheral Interface Bus
The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard named by Motorola that operates in full duplex mode. Devices communicate in master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select ...

.

Information is written and read from a DataFlash chip using any microcontroller, such as the Atmel AVR
Atmel AVR
The AVR is a modified Harvard architecture 8-bit RISC single chip microcontroller which was developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-chip flash memory for program storage, as opposed to one-time programmable ROM, EPROM, or EEPROM used by other...

, the Microchip PIC
PIC microcontroller
PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division...

 or the ARM
ARM architecture
ARM is a 32-bit reduced instruction set computer instruction set architecture developed by ARM Holdings. It was named the Advanced RISC Machine, and before that, the Acorn RISC Machine. The ARM architecture is the most widely used 32-bit ISA in numbers produced...

. The Boot ROM of numerous Atmel ARM microcontrollers support downloading code from DataFlash chips after reset.

The AT26 series DataFlash chips are software-incompatible with the original AT45 series chips. They use a simpler command set, supported by other vendors of serial flash but omitting SRAM buffers and other features that make AT45 chips simpler to support.
On this page, only the original AT45 series chips will be called DataFlash; in this case, brand-oriented marketing creates needless technical confusion.

Examples of DataFlash

The AT45DB161D chip
Integrated circuit
An integrated circuit or monolithic integrated circuit is an electronic circuit manufactured by the patterned diffusion of trace elements into the surface of a thin substrate of semiconductor material...

 is an example of a 2 MB
Megabyte
The megabyte is a multiple of the unit byte for digital information storage or transmission with two different values depending on context: bytes generally for computer memory; and one million bytes generally for computer storage. The IEEE Standards Board has decided that "Mega will mean 1 000...

 (16 Mbit
Megabit
The megabit is a multiple of the unit bit for digital information or computer storage. The prefix mega is defined in the International System of Units as a multiplier of 106 , and therefore...

) dataflash chip available from Atmel. This chip comes in a 8x5 mm SOIC 8-pin package. This chip is used in a huge number of consumer electronic products. Any microcontroller can use this chip to store data.

The AT45DCB008D card is an 8 MB (64 Mbit) flash memory card, which could be mistaken for an MMC
MultiMediaCard
The MultiMediaCard is a flash memory memory card standard. Unveiled in 1997 by Siemens AG and SanDisk, it is based on Toshiba's NAND-based flash memory, and is therefore much smaller than earlier systems based on Intel NOR-based memory such as CompactFlash. MMC is about the size of a postage...

 or SD card. This DataFlash card packages an AT45DB642D flash chip, which is also available in 8x6 mm CASON 8-pin packages.

Comparison between DataFlash, EEPROM and MMC/SD

Both DataFlash and EEPROM
EEPROM
EEPROM stands for Electrically Erasable Programmable Read-Only Memory and is a type of non-volatile memory used in computers and other electronic devices to store small amounts of data that must be saved when power is removed, e.g., calibration...

 chips can be accessed from a microcontroller, using a 4-wire SPI
Serial Peripheral Interface Bus
The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard named by Motorola that operates in full duplex mode. Devices communicate in master/slave mode where the master device initiates the data frame. Multiple slave devices are allowed with individual slave select ...

 bus. Both are available in small 8 pin packages. The protocol interfaces are very similar; in both cases, byte
Byte
The byte is a unit of digital information in computing and telecommunications that most commonly consists of eight bits. Historically, a byte was the number of bits used to encode a single character of text in a computer and for this reason it is the basic addressable element in many computer...

s are written or read, via SPI, one or more bytes at a time.

DataFlash usually had higher capacities than EEPROM in the early days, and it still provides faster access times. DataFlash capacities in small packages range from 128 kB
Kilobyte
The kilobyte is a multiple of the unit byte for digital information. Although the prefix kilo- means 1000, the term kilobyte and symbol KB have historically been used to refer to either 1024 bytes or 1000 bytes, dependent upon context, in the fields of computer science and information...

 to 8 MB, while SPI EEPROM capacities in similar packages range from 1 kB to 8 MB .
Flash chips are tuned for page access, rather than the byte access used with EEPROM.
However, AT45 series chips have commands that let their drivers act more like EEPROM drivers.
Leveraging the SRAM buffers exposed by AT45 chips to do more than support EEPROM-like access requires specialized software.

DataFlash cards are more expensive than the consumer oriented MMC
MultiMediaCard
The MultiMediaCard is a flash memory memory card standard. Unveiled in 1997 by Siemens AG and SanDisk, it is based on Toshiba's NAND-based flash memory, and is therefore much smaller than earlier systems based on Intel NOR-based memory such as CompactFlash. MMC is about the size of a postage...

 or SD cards, and have lower capacities, but have an extremely simple programming interface compared to MMC/SD. All these cards can be used in SPI mode.

In summary, DataFlash enables use of more data storage and faster access times than EEPROM. DataFlash chips can leverage the AT45 SRAM buffers. EEPROMs, AT26 series chips, or MMC/SD cards permit use of second sources for parts.

For cards used in field upgrades, DataFlash cards permit simple software support and compatibility with on-board flash chips; MMC/SD costs less.

The programming code required to interface EEPROM to the DataFlash chip is simpler.

Example C source code to interface to DataFlash

A free example of PIC microcontroller
PIC microcontroller
PIC is a family of Harvard architecture microcontrollers made by Microchip Technology, derived from the PIC1650 originally developed by General Instrument's Microelectronics Division...

 source code in C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

, that can be used to interface to any DataFlash chip, is available from www.microchipC.com.

Another free example which uses a more generic approach, suitable for most microcontrollers, can be found as a driver for BeRTOS
BeRTOS
BeRTOS is a real-time operating system designed for embedded systems.It is distributed under a modified GPL license with a special exception that grants proprietary applications the right to keep their source code closed while maintaining the BeRTOS code itself open.It has a very modular design,...

, and is available from http://doc.bertos.org/2.7/dataflash_8c_source.html

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK