I have a ESP8266-01 and a Microchip 23LC1024 memory chip which communicates via SPI bus, and I want to drive it using the ESP8266-01. My thought is to implement the SPI protocol in software i.e. bit-banging. My concern is about driving the clock signal in very specific timings. Basically this question is a generic question about SPI: If SPI is a synchronous protocol, which means that the clock of the master tells the slave when to read/write data, does the clock frequency must be very specific? I mean - does the clock must go HIGH and LOW in a very rigid time intervals?
The clock frequency is irrelevant, as long as it's low enough.
The datasheet says the maximum frequency is 20 MHz, so that limits the highest speed. That equals to 50ns clock period.
The other requirement for the clock is that it must be high for at least 25ns and low for at least 25ns, which totals up to 50ns.
The third requirement for the clock is that it must transition fast enough, it must go from low to high, and from high to low, in 20ns.
There is no requirement for minimum clock frequency or maximum value for the clock to be high or low. You can transmit bits how irregularly you want, and even take infinitely long time periods between bits.