Hi Agxin,
MISO pin is Mater In, Slave Out pin.
So, this pins is digital output in SPI slave mode and you should connect it with the input of SPI master (if you apply two-way communication).
The same way you should work with MOSI pin. It has to be connected to the output at SPI master device.
Also, the SCK pin acts as output/input according to master/slave mode selected. If SPI module is configured as the slave, it will be the input pin.
See Figure 21-11. Master/Slave Transfer Block Diagram in the datasheet.
I hope it helps you.
Have a great day,
Radek
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------