Skip to content

Arduino library for Winbond Flash W25Q80BV - 64 Mbits (1MB)

Compare
Choose a tag to compare
@Marzogh Marzogh released this 20 Jun 14:52
· 589 commits to master since this release

SPIFlash Build Status DOI

GitHub commits
GitHub issues
GitHub pull requests
license

All functions have been tested and found to work well on Arduino 1.6.x.

Please report any issues and I will do my best to fix them.

Change log

v 1.0

Installation
  • Click on the 'Download zip' button to the right.
  • Unzip the archive and rename resulting folder to 'SPIFlash'
  • Move the folder to your libraries folder (~/sketches/libraries)
Usage

The library is called by declaring theSPIFLASH flash(csPin) constructor where 'flash' can be replaced by a user constructor of choice and 'csPin' is the Chip Select pin for the flash module.
Make sure to include #include<SPI.H> when you include #include<SPIFlash.h>.

The library enables the following functions: (For further details on the functions refer to README.md)


Get JEDEC ID
getID ()

Continuous read commands
beginRead(address)
readNextByte()
endRead()

Read commands
readByte(page, offset)
readPage(page_number, *page_buffer, outputType)

Write commands
writeByte(page, offset, data)

Writes a byte of data to a specific location on a page. Takes the page number (0-4095), offset of data byte within page (0-255) and one byte of data (0-255) as arguments.

writePage(uint16_t page_number, uint8_t *page_buffer)

Erase commands
eraseSector(address)
eraseBlock32K(address)
eraseBlock64K(address)
eraseChip()

Suspend/Resume commands
suspendProg()
resumeProg()

Power operation commands
powerDown()
powerUp()

readAllPages()
How to get data off Flash memory via Serial

(Works only for Unix based Operating Systems)
Refer to README.md