Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
AT45DBX DataFlash example for STK600-RC064X Documentation

Introduction

This example demonstrates how to use the Atmel DataFlash AT45DBx component. The DataFlash requires an SPI bus as a low level communication interface. This interface can be implemented using SPI or USART in SPI mode for AVR devices.

Main Files

services/basic/spi API

The SPI API can be found here for SPI module connection or here for USART in SPI mode.

Device Info

All AVR devices can be used. This example has been tested with the following setup:

  • Evaluation kits with a DataFlash connected to an SPI interface.

Description of the example

  • Send "Read Status" command to the dataflash.
  • Read back the status of the dataflash.
  • Write two sectors to the dataflash
  • Read Back these sectors and check correct content
  • If all operations are correct, DATA_FLASH_LED_EXAMPLE_0 is 'on' and DATA_FLASH_LED_EXAMPLE_1 is 'on' other leds state means the DataFlash access fails somewhere.

Compilation Info

This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.

Contact Information

For further information, visit Microchip.