FastArduino v1.10
C++ library to build fast but small Arduino/AVR projects
Loading...
Searching...
No Matches
winbond.h File Reference

API to handle WinBond flash memory chips through SPI interface. More...

#include "../spi.h"
#include "../time.h"
#include "../utilities.h"
Include dependency graph for winbond.h:

Go to the source code of this file.

Classes

class  devices::WinBond< CS >
 SPI device driver for WinBond flash memory chips, like W25Q80BV (8 Mbit flash). More...
 
struct  devices::WinBond< CS >::Status
 This type maps WinBond Status register (§6.1) to more readable pieces. More...
 
struct  devices::WinBond< CS >::Device
 Device information (§6.2.31) More...
 

Namespaces

namespace  devices
 Defines all API for all external devices supported by FastArduino.
 

Detailed Description

API to handle WinBond flash memory chips through SPI interface.

Connection diagram:

            W25Q80BV
           +----U----+

(/CS)-----—1-|/CS VCC|-8------—(VCC) (MISO)----—2-|DO /HOLD|-7–VVVV—(VCC) –3-|/WP CLK|-6------—(CLK) (GND)-----—4-|GND DI|-5------—(MOSI) +------—+

Note that WinBond IC works on Vcc = 3.3V (not 5V) and any inputs should be limited to 3.3V, hence, when working with 5V MCU, use level converters at least for DI, CLK and CS pins. This library operates WinBond IC in single SPI mode only (WinBond supports dual and quad modes); in this mode, the /HOLD pin should not be left dangling as it may trigger transmission errors when CS is low (active). I use a 10K resistor to pullup this pin to Vcc (3.3V).

See also
https://github.com/jfpoilpret/fast-arduino-lib/blob/master/refs/devices/WinBond-W25Q80BV.pdf

Definition in file winbond.h.