Microchip | The Embedded Control Solutions Company Register Login
Browse All
 10 Code Snippets

AT45DB041D SPI NAND Flash driver


The serial-interface sequential access flash memory ideally suited for a wide variety of digital voice, image, program code, and data storage applications. The flash memory also contains two SRAM buffers of 256 or 264bytes each that receive data while a page in the main memory is reprogrammed, as well as writing a continuous data stream. Now, you can use it with your favorite PIC MCU. Again, I'm using sw SPI for portability.

About this Code Example

#include <p30f3011.h>
#include "NAND_FLASH_Driver.h"

void main (void)

    InitNandFlash();  //Init AT45DB041D NAND Flash memory
    int mem_page=0; 

    main_mem_page_to_buffer(mem_page); //copy from mem page(NAND) to buffer1(RAM)
    write_to_buffer(0,0xFF);   //write 0xFF in 0 location
    write_to_buffer(1,0xAA);   //wirte 0xAA in 1 location
    buffer_to_main_mem_page(mem_page); //copy from buffer1(RAM) to mem page(NAND) 


Release History

  • Feb 7, 2012

    Version: 1.0.0

    first release

Download Contact the Developer

*Required Fields

  • Current Version:1.0.0
  • Created:Feb 7, 2012
  • Updated:Feb 26, 2015
  • Downloads:8162
  • MPLAB Version:8.83
  • C Compiler:C30
  • Development Tools:ICD-3
  • Supported Devices:DSPIC,PIC18,PIC24

Corporate News


Stay Connected

Stay up to date with the latest news from Microchip Technology.