|
To read the status register, an opcode of 57H or D7H must be loaded into the device. After the last bit of the opcode is shifted in, the eight bits of the
status register, starting with the MSB (bit 7), will be shifted out on the SO pin during the
next eight clock cycles.
Так что вот чтение статуса:
//////////////////////////////////////////////////////////////////////
// wait until DataFlash busy
void df_wait (void)
{
DATAFLASH_ENABLE();
do {
spi_write(STATUS_REGISTER_READ);
} while ( (spi_read() & (1<<7) ) == 0);
DATAFLASH_DISABLE();
}
E-mail: info@telesys.ru