I'm having some trouble understanding the SPI protocol and I would appreciate if someone could clarify for me. So the SPI protocol requires a clock, a MOSI, a MISO and a slave select pin. I understand how MOSI, MISO and slave select works but I'm having some trouble with the clock.
The master pin sets the clock and in most devices, data is transmitted on a clock edge. Some devices require a certain number of clock edges to fully 'shift' out the data. My question is how do I control the clock pulses? How do I determine the number of clock pulses? Do I manually pick a clock pin and write a digital high or low signal to it? Or does the arduino 'pulse' the clock automatically?
If the arduino pulses automatically, which pin do I use to access the internal clock and can it be modified?
Thanks in advance.