Hi everyone. I have a couple of questions regarding the SPI module in the 16F877.
1- In the datasheets, I read that in the master mode, the SPI clock rate (bit rate) is user programmable to one of the following:
Fosc/4
Fosc/16
Fosc/64
TMR2 output.
This allows a maximum data rate (at 20 MHz) of 8.25 Mbps.
Can someone please explain to me how did they get the 8.25Mbps?!
2- I also intend to connect the PIC to an electronic compass that communicates through the SPI bus. In the datasheets of the compass, it says that the clock signal (SCK) should be such that the high time is 16us and the low time is 22 us. How can I do that?! I thought the clock signal generated by the PIC has a square wave shape with a 50% duty cycle and that it has one of the frequencies listed in the first question above.
Please help. Thanks.