Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
learn:fundamentals:communication-protocols:spi:start [2016/07/11 20:47] – created Sam Klearn:fundamentals:communication-protocols:spi:start [2021/06/09 00:23] (current) Arthur Brown
Line 2: Line 2:
  
 ====== SPI ====== ====== SPI ======
 +{{:learn:fundamentals:communication-protocols:spi:dspi.zip|Digilent's SPI library}}
 ===== Overview ===== ===== Overview =====
  
Line 45: Line 45:
 There are two ways to implement SPI on a microcontroller: you can use a hardware implementation of SPI (which is one of the benefits of a microcontroller, having hardware implementations of common interfaces such as SPI) or "bit-bang" SPI by implementing and controlling each of the SPI lines through software. With bit-banging, you can choose which digital pins to implement your SPI pins. With the hardware implementation you have a specific set of pins that you need to use in order to implement your communication protocol. To figure out which pins you need to use on your host board, it is best to look at the reference manual for your system board. There are two ways to implement SPI on a microcontroller: you can use a hardware implementation of SPI (which is one of the benefits of a microcontroller, having hardware implementations of common interfaces such as SPI) or "bit-bang" SPI by implementing and controlling each of the SPI lines through software. With bit-banging, you can choose which digital pins to implement your SPI pins. With the hardware implementation you have a specific set of pins that you need to use in order to implement your communication protocol. To figure out which pins you need to use on your host board, it is best to look at the reference manual for your system board.
  
-Say you have a Digilent's [[https://reference.digilentinc.com/chipkit_wf32/refmanual|chipKIT WF32]]. If you go to the reference manual, you can go to the [[chipkit_wf32/refmanual#peripheral_io_functions|Peripheral IO Functions]] and find the SPI section. Here we can see that the default DSPI0 (Digilent SPI 0) is located on pins 10, 11, 12, and 13 for SS, MOSI, MISO, and SCLK, respectively. +Say you have a Digilent's [[/chipkit_wf32/refmanual|chipKIT WF32]]. If you go to the reference manual, you can go to the [[chipkit_wf32/refmanual#peripheral_io_functions|Peripheral IO Functions]] and find the SPI section. Here we can see that the default DSPI0 (Digilent SPI 0) is located on pins 10, 11, 12, and 13 for SS, MOSI, MISO, and SCLK, respectively. 
  
 ---- ----