Datasheet
page 36
v7
Flash memory is a non-volatile storage chip that
can be electrically erased and reprogrammed. It
was developed from EEPROM (electrically erasable
programmable read-only memory) and must be
erased in fairly large blocks before these can be
rewritten with new data. The high density NAND type
must also be programmed and read in (smaller) blocks,
or pages, while the NOR type allows a single machine
word (byte) to be written or read independently. Flash
memories come in dierent sizes and supporting dierent
clock speeds. They are mostly used for mass storage, as in
USB Flash Drives, which are very popular today.
EasyPIC Fusion
™
v7 features M25P80 serial Serial Flash Memory
which uses SPI communication interface and has 8 Mbits of available
memory, organized as 16 sectors, each containing 256 pages. Each page is 256
bytes wide. Thus, the whole memory can be viewed as consisting of 4096 pages, or
1,048,576 bytes. Maximum clock frequency for READ instructions is 40MHz.
other modules
Serial Flash Memory
In order to connect Serial Flash Memory to
the microcontroller you must enable SW13.1,
SW13.2, SW13.3 and SW13.4 switches. This
connects SPI lines to SCK, MISO, MOSI and
RD14 (CS) microcontroller pins.
The Serial Peripheral Interface Bus or SPI bus is a synchronous serial data link standard that operates in full
duplex mode. It consists of four lines MISO (Master Input Slave Output), MOSI (Master Output Slave Input), SCK
(Clock) and CS (Chip Select). Devices communicate in master/slave mode where the master device initiates the
data frame. Multiple slave devices are allowed with individual slave select (chip select) lines.
Enabling Serial Flash
What is SPI?
Figure 22-1:
Schematic of
Serial Flash
Memory
module
1
2
3
54
6
7
8
CS
SDO
WP
GND SDI
SCK
HOLD
VCC
U6
25P80
VCC-3.3V
R39
100K
C27
100nF
VCC-3.3V
FLASH-CS#
PH_MISO
PH_MOSI
PH_SCK
R43 27
VCC-3.3V
1 2 3 4 5 6 7 8
O
N
SW13
FLASH-CS#
PH_MOSI
PH_MISO
PH_SCK
RD14
MOSI
MISO
SCK
DATA BUS