diff --git a/tech/SPI.wiki b/tech/SPI.wiki new file mode 100644 index 0000000..ebd8e1d --- /dev/null +++ b/tech/SPI.wiki @@ -0,0 +1,32 @@ += SPI = + +SPI or Serial peripheral interface is the standard often used as a form of +interchip communication on boards, and in embedded devices. + +See https://www.youtube.com/watch?v=MCi7dCBhVpQ + +== Layout == + +Each device, the master and slave (often microcontroler as master and +peripheral/sensor as slave) have four pins + +* SCK - Serial Clock +* CS - Chip select (active low) +* SDI - Serial data in +* SDO - Serial data out + +NOTE serial data * is from the persepctive of the device (SDI on master is +connected to SDO on slave and vice versa). + +SDO on the master to SDI on the peripherial is often called MOSI (Master out +Slave in), and the inverse is often called MISO (Master in Slave out). + +Some chips may only have a MOSI, as some devices do not create data to send +back to the master. + +== Sending data == + +On the *rising edge* of the clock, each device reads what is currently set on +the respective input port. The chip must also have its output set before the +rising edge, to ensure that the device will receive the data it intends to +send. All of this only occurs when CS is set low. diff --git a/tech/embedded.wiki b/tech/embedded.wiki index 5debd6c..3c9e726 100644 --- a/tech/embedded.wiki +++ b/tech/embedded.wiki @@ -16,7 +16,7 @@ user, sometimes so that they don't even know there is a computer - Pi Pico * [[ARM]] Processor type -=== Line of products === +== Line of products == * [[ATMega328P|Arduino Nano]] * [[ESP32]] @@ -41,16 +41,22 @@ user, sometimes so that they don't even know there is a computer * [[nRF24L01]] +Also see [[Ham]] + ==== Power regulation ==== * [[TP4056]] * [[TPS76933DBVR]] -=== Programming === +== Programming == * [[../lang/C|C]] * [[../lang/C++|C++]] * [[arduino_techniques|Techniques]] * [[cross_toolchain|Arduino Cross-Toolchain setup]] +== Communication == + +* [[SPI]] + [[index]]