{"id":2208,"date":"2022-05-06T10:12:28","date_gmt":"2022-05-06T10:12:28","guid":{"rendered":"https:\/\/picockpit.com\/raspberry-pi\/?p=2208"},"modified":"2023-09-18T13:52:24","modified_gmt":"2023-09-18T13:52:24","slug":"spi-the-serial-peripheral-interface","status":"publish","type":"post","link":"https:\/\/picockpit.com\/raspberry-pi\/sv\/spi-the-serial-peripheral-interface\/","title":{"rendered":"SPI - Seriellt perifert gr\u00e4nssnitt"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image-1024x576.png\" alt=\"Allt om SPI Title Image\" class=\"wp-image-5345\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image-1024x576.png 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image-300x169.png 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image-768x432.png 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image-18x10.png 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>SPI betyder Serial Peripheral Interface. Med SPI kan du utbyta data otroligt snabbt mellan tv\u00e5 enheter. Och du beh\u00f6ver bara fyra kablar.<\/p>\n\n\n\n\n\n<h2 class=\"wp-block-heading\">SPI-egenskaper<\/h2>\n\n\n\n<p>Det seriella periferiska gr\u00e4nssnittet \u00e4r ett synkront kommunikationsgr\u00e4nssnitt f\u00f6r korta avst\u00e5nd. Synkron inneb\u00e4r att data skickas i form av block eller ramar och att de tv\u00e5 enheterna \u00e4r synkroniserade med hj\u00e4lp av en klocka. Det \u00e4r ett seriellt gr\u00e4nssnitt s\u00e5 enheterna skickar en bit i taget (till skillnad fr\u00e5n parallell kommunikation). En av enheterna \u00e4r \"master\" och dikterar klockcykeln. Den andra enheten \u00e4r \"slav\". Vanligtvis sker kommunikationen i full duplexl\u00e4ge. D\u00e4rf\u00f6r kan b\u00e5da enheterna s\u00e4nda data, \u00e4ven samtidigt.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Characteristics-1024x275.jpg\" alt=\"SPI-egenskaper\" class=\"wp-image-2211\" style=\"width:676px;height:181px\" width=\"676\" height=\"181\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Characteristics-1024x275.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Characteristics-300x81.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Characteristics-768x207.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Characteristics-1536x413.jpg 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Characteristics-2048x551.jpg 2048w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Characteristics-18x5.jpg 18w\" sizes=\"auto, (max-width: 676px) 100vw, 676px\" \/><figcaption class=\"wp-element-caption\">SPI-egenskaper<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Ledningar<\/h2>\n\n\n\n<p>Du beh\u00f6ver bara fyra kablar f\u00f6r anslutningen, s\u00e5 det \u00e4r mycket enkelt att installera.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Wiring-1024x497.jpg\" alt=\"SPI-ledningar\" class=\"wp-image-2217\" style=\"width:665px;height:322px\" width=\"665\" height=\"322\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Wiring-1024x497.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Wiring-300x146.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Wiring-768x372.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Wiring-1536x745.jpg 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Wiring-2048x993.jpg 2048w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Wiring-18x9.jpg 18w\" sizes=\"auto, (max-width: 665px) 100vw, 665px\" \/><figcaption class=\"wp-element-caption\">SPI-ledningar<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Det finns fyra stift som du beh\u00f6ver f\u00f6r en SPI-anslutning: Seriell klocka (SCL eller SCLK), Master Output Slave Input (MOSI), Master Input Slave Output (MISO) och Chip Select eller Slave Select-stift (CS eller SS).<\/p>\n\n\n\n<p>Anslut motsvarande stift p\u00e5 master- och slavenheterna.<\/p>\n\n\n\n<p>En master-enhet kan ansluta till flera slavenheter s\u00e5 l\u00e4nge den har tillr\u00e4ckligt m\u00e5nga chip select-pinnar. Master-enheten styr vilken slavenhet som tar emot data genom att st\u00e4lla in motsvarande chip select-stift till LOW eller HIGH.<\/p>\n\n\n\n<p>Raspberry Pi 4 har 7 SPI-bussar . Om du vill veta hur du f\u00e5r tillg\u00e5ng till SPI-bussarna 1 till 6 kan du l\u00e4mna en kommentar nedan.<\/p>\n\n\n\n<p>L\u00e5t oss ta en titt p\u00e5 <a href=\"https:\/\/www.raspberrypi.com\/documentation\/computers\/raspberry-pi.html#spi-overview\">SPI-buss 0<\/a>.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\" id=\"raspberry-pi-pinout\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Pinout-1024x584.jpg\" alt=\"Raspberry Pi Pinout\" class=\"wp-image-2218\" style=\"width:659px;height:376px\" width=\"659\" height=\"376\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Pinout-1024x584.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Pinout-300x171.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Pinout-768x438.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Pinout-1536x876.jpg 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Pinout-2048x1167.jpg 2048w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Pinout-18x10.jpg 18w\" sizes=\"auto, (max-width: 659px) 100vw, 659px\" \/><figcaption class=\"wp-element-caption\">Raspberry Pi Pinout<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Som du kan se i <a href=\"#raspberry-pi-pinout\">Pinout-grafik<\/a> ovanf\u00f6r stift 23 \u00e4r SCLK-stiftet p\u00e5 Raspberry Pi. MISO \u00e4r stift 21 och MOSI \u00e4r stift 19.  Buss 0 har tv\u00e5 CS-stift som \u00e4r stift 24 och 26.<\/p>\n\n\n\n<p>Om du vill anv\u00e4nda buss 0 m\u00e5ste du f\u00f6rst aktivera den.<\/p>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"1080\" style=\"aspect-ratio: 1920 \/ 1080;\" width=\"1920\" controls src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/Enable-SPI.mp4\"><\/video><\/figure>\n\n\n\n<p>Utf\u00f6r kommandot<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code data-no-translation=\"\">sudo raspi-config<\/code><\/pre>\n\n\n\n<p>V\u00e4lj sedan <strong>3 gr\u00e4nssnittsalternativ<\/strong> och klicka p\u00e5 <strong>I4 SPI<\/strong>. Tryck slutligen p\u00e5 <strong>Ja<\/strong> och <strong>Ok<\/strong> f\u00f6r att aktivera SPI.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">SPI-l\u00e4gen<\/h2>\n\n\n\n<p>Det finns fyra olika data\u00f6verf\u00f6ringsl\u00e4gen som du b\u00f6r k\u00e4nna till. De skiljer sig \u00e5t i klockpolaritet och klockfas.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"310\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Modes-1024x310.jpg\" alt=\"SPI-l\u00e4gen\" class=\"wp-image-2216\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Modes-1024x310.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Modes-300x91.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Modes-768x233.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Modes-1536x465.jpg 1536w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Modes-2048x620.jpg 2048w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Modes-18x5.jpg 18w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">SPI-l\u00e4gen<\/figcaption><\/figure>\n\n\n\n<p>B\u00e5da kan vara antingen 0 eller 1. N\u00e4r det g\u00e4ller klockans polaritet inneb\u00e4r 0 ett l\u00e5gt tomg\u00e5ngstillst\u00e5nd och 1 ett h\u00f6gt tomg\u00e5ngstillst\u00e5nd. En klockfas p\u00e5 0 inneb\u00e4r att data skickas p\u00e5 den fallande flanken, medan en 1 inneb\u00e4r att data skickas p\u00e5 den stigande flanken. Innan de kan skicka data m\u00e5ste master och slav komma \u00f6verens om ett av de fyra l\u00e4gena.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">F\u00f6rdelar<\/h2>\n\n\n\n<p>De st\u00f6rsta f\u00f6rdelarna \u00e4r den h\u00f6ga hastigheten, den enkla installationen av maskinvara och programvara och det l\u00e5ga energibehovet.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Advantages-1024x557.jpg\" alt=\"F\u00f6rdelar\" class=\"wp-image-2215\" style=\"width:369px;height:200px\" width=\"369\" height=\"200\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Advantages-1024x557.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Advantages-300x163.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Advantages-768x418.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Advantages-18x10.jpg 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Advantages.jpg 1104w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><figcaption class=\"wp-element-caption\">F\u00f6rdelar<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Nackdelar<\/h2>\n\n\n\n<p>Det seriella perifera gr\u00e4nssnittet kan inte riktigt utvidgas n\u00e4r det g\u00e4ller r\u00e4ckvidd och antal enheter eftersom masteren beh\u00f6ver en chip select-stift f\u00f6r varje enhet. Det finns inte heller n\u00e5gon bekr\u00e4ftelse fr\u00e5n slaven i maskinvaran, s\u00e5 masteren vet inte om data tas emot av n\u00e5gon.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Disadvantages-1024x558.jpg\" alt=\"Nackdelar\" class=\"wp-image-2214\" style=\"width:366px;height:199px\" width=\"366\" height=\"199\" srcset=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Disadvantages-1024x558.jpg 1024w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Disadvantages-300x163.jpg 300w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Disadvantages-768x418.jpg 768w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Disadvantages-18x10.jpg 18w, https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/SPI-Disadvantages.jpg 1103w\" sizes=\"auto, (max-width: 366px) 100vw, 366px\" \/><figcaption class=\"wp-element-caption\">Nackdelar<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\">Anv\u00e4ndningsomr\u00e5den<\/h2>\n\n\n\n<p>De flesta SPI-enheter \u00e4r inbyggda enheter eller <a href=\"https:\/\/buyzero.de\/products\/1-3-spi-colour-lcd-240x240-breakout?_pos=1&amp;_sid=2104ef18d&amp;_ss=r\">LCD-sk\u00e4rmar<\/a>. I allm\u00e4nhet anv\u00e4nds den i omr\u00e5den d\u00e4r det kr\u00e4vs f\u00e5 enheter och snabb data\u00f6verf\u00f6ring.<\/p>\n\n\n\n<p>Det g\u00f6r det m\u00f6jligt f\u00f6r Raspberry Pi att koppla ihop alla typer av <a href=\"https:\/\/buyzero.de\/search?type=product&amp;options%5Bprefix%5D=last&amp;options%5Bunavailable_products%5D=last&amp;q=SPI\">sensorer och anordningar<\/a>. N\u00e4stan alla Raspberry Pi-kompatibla enheter anv\u00e4nder SPI- eller I2C-gr\u00e4nssnittet.<\/p>\n\n\n\n<p>SD-kort anv\u00e4nder ocks\u00e5 SPI-gr\u00e4nssnittet, s\u00e5 \u00e4ven SD-kortl\u00e4saren p\u00e5 Raspberry Pi har n\u00e5gra interna MISO- och MOSI-stift.<\/p>\n<div class=\"shariff shariff-align-center shariff-widget-align-left shariff-buttonstretch\"><ul class=\"shariff-buttons theme-white orientation-horizontal buttonsize-medium\"><li class=\"shariff-button twitter shariff-nocustomcolor\" style=\"background-color:#595959\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fsv%2Fspi-the-serial-peripheral-interface%2F&text=SPI%20%E2%80%93%20The%20Serial%20Peripheral%20Interface\" title=\"Dela p\u00e5 X\" aria-label=\"Dela p\u00e5 X\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#000; color:#000\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#000\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#000\">dela<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button facebook shariff-nocustomcolor\" style=\"background-color:#4273c8\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fsv%2Fspi-the-serial-peripheral-interface%2F\" title=\"Dela p\u00e5 Facebook\" aria-label=\"Dela p\u00e5 Facebook\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\"; background-color:#3b5998; color:#3b5998\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#3b5998\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#3b5998\">dela<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button telegram shariff-nocustomcolor\" style=\"background-color:#4084A6\"><a href=\"https:\/\/telegram.me\/share\/url?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fsv%2Fspi-the-serial-peripheral-interface%2F&text=SPI%20%E2%80%93%20The%20Serial%20Peripheral%20Interface\" title=\"Dela p\u00e5 Telegram\" aria-label=\"Dela p\u00e5 Telegram\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#0088cc; color:#0088cc\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#0088cc\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 32 32\"><path fill=\"#0088cc\" d=\"M30.8 6.5l-4.5 21.4c-.3 1.5-1.2 1.9-2.5 1.2L16.9 24l-3.3 3.2c-.4.4-.7.7-1.4.7l.5-7L25.5 9.2c.6-.5-.1-.8-.9-.3l-15.8 10L2 16.7c-1.5-.5-1.5-1.5.3-2.2L28.9 4.3c1.3-.5 2.3.3 1.9 2.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#0088cc\">dela<\/span>&nbsp;<\/a><\/li><li class=\"shariff-button reddit shariff-nocustomcolor\" style=\"background-color:#ff5700\"><a href=\"https:\/\/www.reddit.com\/submit?url=https%3A%2F%2Fpicockpit.com%2Fraspberry-pi%2Fsv%2Fspi-the-serial-peripheral-interface%2F\" title=\"Dela p\u00e5 Reddit\" aria-label=\"Dela p\u00e5 Reddit\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\"; background-color:#ff4500; color:#ff4500\" target=\"_blank\"><span class=\"shariff-icon\" style=\"fill:#ff4500\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewbox=\"0 0 512 512\"><path fill=\"#ff4500\" d=\"M440.3 203.5c-15 0-28.2 6.2-37.9 15.9-35.7-24.7-83.8-40.6-137.1-42.3L293 52.3l88.2 19.8c0 21.6 17.6 39.2 39.2 39.2 22 0 39.7-18.1 39.7-39.7s-17.6-39.7-39.7-39.7c-15.4 0-28.7 9.3-35.3 22l-97.4-21.6c-4.9-1.3-9.7 2.2-11 7.1L246.3 177c-52.9 2.2-100.5 18.1-136.3 42.8-9.7-10.1-23.4-16.3-38.4-16.3-55.6 0-73.8 74.6-22.9 100.1-1.8 7.9-2.6 16.3-2.6 24.7 0 83.8 94.4 151.7 210.3 151.7 116.4 0 210.8-67.9 210.8-151.7 0-8.4-.9-17.2-3.1-25.1 49.9-25.6 31.5-99.7-23.8-99.7zM129.4 308.9c0-22 17.6-39.7 39.7-39.7 21.6 0 39.2 17.6 39.2 39.7 0 21.6-17.6 39.2-39.2 39.2-22 .1-39.7-17.6-39.7-39.2zm214.3 93.5c-36.4 36.4-139.1 36.4-175.5 0-4-3.5-4-9.7 0-13.7 3.5-3.5 9.7-3.5 13.2 0 27.8 28.5 120 29 149 0 3.5-3.5 9.7-3.5 13.2 0 4.1 4 4.1 10.2.1 13.7zm-.8-54.2c-21.6 0-39.2-17.6-39.2-39.2 0-22 17.6-39.7 39.2-39.7 22 0 39.7 17.6 39.7 39.7-.1 21.5-17.7 39.2-39.7 39.2z\"\/><\/svg><\/span><span class=\"shariff-text\" style=\"color:#ff4500\">dela<\/span>&nbsp;<\/a><\/li><\/ul><\/div>","protected":false},"excerpt":{"rendered":"<p>SPI betyder Serial Peripheral Interface. Med SPI kan du utbyta data otroligt snabbt mellan tv\u00e5 enheter. Och du beh\u00f6ver bara fyra kablar. SPI-egenskaper Det seriella perifera gr\u00e4nssnittet \u00e4r ett synkront kommunikationsgr\u00e4nssnitt f\u00f6r korta avst\u00e5nd. Synkron inneb\u00e4r att data skickas i form av block eller ramar och att de tv\u00e5 enheterna \u00e4r...<\/p>","protected":false},"author":3,"featured_media":5345,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[196],"tags":[199,200,202,201,204,189,203,188,198,197],"class_list":["post-2208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-interfaces","tag-4-wire-interface","tag-4-wire-spi","tag-hardware","tag-interface","tag-knowledge","tag-pi","tag-rasbperry-pi","tag-raspberry","tag-serial-peripheral-interface","tag-spi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>SPI - The Serial Peripheral Interface | PiCockpit<\/title>\n<meta name=\"description\" content=\"SPI means Serial Peripheral Interface. With SPI you can exchange data blazingly fast between two devices. And you only need four wires.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/picockpit.com\/raspberry-pi\/sv\/spi-the-serial-peripheral-interface\/\" \/>\n<meta property=\"og:locale\" content=\"sv_SE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SPI - The Serial Peripheral Interface | PiCockpit\" \/>\n<meta property=\"og:description\" content=\"SPI means Serial Peripheral Interface. With SPI you can exchange data blazingly fast between two devices. And you only need four wires.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/picockpit.com\/raspberry-pi\/sv\/spi-the-serial-peripheral-interface\/\" \/>\n<meta property=\"og:site_name\" content=\"PiCockpit\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pi3gshop\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-06T10:12:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-09-18T13:52:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nathan Busler\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@pi3g\" \/>\n<meta name=\"twitter:site\" content=\"@pi3g\" \/>\n<meta name=\"twitter:label1\" content=\"Skriven av\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nathan Busler\" \/>\n\t<meta name=\"twitter:label2\" content=\"Ber\u00e4knad l\u00e4stid\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minuter\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/\"},\"author\":{\"name\":\"Nathan Busler\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/e38fef75134e5e54175b2615a8c3eb47\"},\"headline\":\"SPI &#8211; The Serial Peripheral Interface\",\"datePublished\":\"2022-05-06T10:12:28+00:00\",\"dateModified\":\"2023-09-18T13:52:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/\"},\"wordCount\":564,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/everything-about-spi-title-image.png\",\"keywords\":[\"4-Wire-Interface\",\"4-Wire-SPI\",\"Hardware\",\"Interface\",\"Knowledge\",\"Pi\",\"Rasbperry Pi\",\"Raspberry\",\"Serial Peripheral Interface\",\"SPI\"],\"articleSection\":[\"Interfaces\"],\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/\",\"name\":\"SPI - The Serial Peripheral Interface | PiCockpit\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/everything-about-spi-title-image.png\",\"datePublished\":\"2022-05-06T10:12:28+00:00\",\"dateModified\":\"2023-09-18T13:52:24+00:00\",\"description\":\"SPI means Serial Peripheral Interface. With SPI you can exchange data blazingly fast between two devices. And you only need four wires.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#breadcrumb\"},\"inLanguage\":\"sv-SE\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#primaryimage\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/everything-about-spi-title-image.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/everything-about-spi-title-image.png\",\"width\":1200,\"height\":675,\"caption\":\"Everything about SPI Title Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/pl\\\/spi-interfejs-serial-peripheral-interface\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interfaces\",\"item\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/category\\\/interfaces\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"SPI &#8211; The Serial Peripheral Interface\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#website\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"name\":\"PiCockpit\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"sv-SE\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#organization\",\"name\":\"PiCockpit.com\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"contentUrl\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/Screenshot-from-2023-07-24-15-01-24.png\",\"width\":1165,\"height\":283,\"caption\":\"PiCockpit.com\"},\"image\":{\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/pi3gshop\",\"https:\\\/\\\/x.com\\\/pi3g\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/#\\\/schema\\\/person\\\/e38fef75134e5e54175b2615a8c3eb47\",\"name\":\"Nathan Busler\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"sv-SE\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93fef66631dac0f47ce2c90f774cd4e4fe44028ea5266602e20fbf246f7d14f9?s=96&d=blank&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93fef66631dac0f47ce2c90f774cd4e4fe44028ea5266602e20fbf246f7d14f9?s=96&d=blank&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/93fef66631dac0f47ce2c90f774cd4e4fe44028ea5266602e20fbf246f7d14f9?s=96&d=blank&r=g\",\"caption\":\"Nathan Busler\"},\"sameAs\":[\"https:\\\/\\\/buyzero.de\"],\"url\":\"https:\\\/\\\/picockpit.com\\\/raspberry-pi\\\/sv\\\/author\\\/nathan\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SPI - det seriella perifera gr\u00e4nssnittet | PiCockpit","description":"SPI betyder Serial Peripheral Interface. Med SPI kan du utbyta data otroligt snabbt mellan tv\u00e5 enheter. Och du beh\u00f6ver bara fyra kablar.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/picockpit.com\/raspberry-pi\/sv\/spi-the-serial-peripheral-interface\/","og_locale":"sv_SE","og_type":"article","og_title":"SPI - The Serial Peripheral Interface | PiCockpit","og_description":"SPI means Serial Peripheral Interface. With SPI you can exchange data blazingly fast between two devices. And you only need four wires.","og_url":"https:\/\/picockpit.com\/raspberry-pi\/sv\/spi-the-serial-peripheral-interface\/","og_site_name":"PiCockpit","article_publisher":"https:\/\/www.facebook.com\/pi3gshop","article_published_time":"2022-05-06T10:12:28+00:00","article_modified_time":"2023-09-18T13:52:24+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image.png","type":"image\/png"}],"author":"Nathan Busler","twitter_card":"summary_large_image","twitter_creator":"@pi3g","twitter_site":"@pi3g","twitter_misc":{"Skriven av":"Nathan Busler","Ber\u00e4knad l\u00e4stid":"4 minuter"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#article","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/"},"author":{"name":"Nathan Busler","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/e38fef75134e5e54175b2615a8c3eb47"},"headline":"SPI &#8211; The Serial Peripheral Interface","datePublished":"2022-05-06T10:12:28+00:00","dateModified":"2023-09-18T13:52:24+00:00","mainEntityOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/"},"wordCount":564,"commentCount":5,"publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image.png","keywords":["4-Wire-Interface","4-Wire-SPI","Hardware","Interface","Knowledge","Pi","Rasbperry Pi","Raspberry","Serial Peripheral Interface","SPI"],"articleSection":["Interfaces"],"inLanguage":"sv-SE","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/","url":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/","name":"SPI - det seriella perifera gr\u00e4nssnittet | PiCockpit","isPartOf":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#website"},"primaryImageOfPage":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#primaryimage"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#primaryimage"},"thumbnailUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image.png","datePublished":"2022-05-06T10:12:28+00:00","dateModified":"2023-09-18T13:52:24+00:00","description":"SPI betyder Serial Peripheral Interface. Med SPI kan du utbyta data otroligt snabbt mellan tv\u00e5 enheter. Och du beh\u00f6ver bara fyra kablar.","breadcrumb":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#breadcrumb"},"inLanguage":"sv-SE","potentialAction":[{"@type":"ReadAction","target":["https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/"]}]},{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#primaryimage","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2022\/05\/everything-about-spi-title-image.png","width":1200,"height":675,"caption":"Everything about SPI Title Image"},{"@type":"BreadcrumbList","@id":"https:\/\/picockpit.com\/raspberry-pi\/pl\/spi-interfejs-serial-peripheral-interface\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/picockpit.com\/raspberry-pi\/"},{"@type":"ListItem","position":2,"name":"Interfaces","item":"https:\/\/picockpit.com\/raspberry-pi\/category\/interfaces\/"},{"@type":"ListItem","position":3,"name":"SPI &#8211; The Serial Peripheral Interface"}]},{"@type":"WebSite","@id":"https:\/\/picockpit.com\/raspberry-pi\/#website","url":"https:\/\/picockpit.com\/raspberry-pi\/","name":"PiCockpit","description":"","publisher":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/picockpit.com\/raspberry-pi\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"sv-SE"},{"@type":"Organization","@id":"https:\/\/picockpit.com\/raspberry-pi\/#organization","name":"PiCockpit.com","url":"https:\/\/picockpit.com\/raspberry-pi\/","logo":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/","url":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","contentUrl":"https:\/\/picockpit.com\/raspberry-pi\/wp-content\/uploads\/2023\/07\/Screenshot-from-2023-07-24-15-01-24.png","width":1165,"height":283,"caption":"PiCockpit.com"},"image":{"@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/pi3gshop","https:\/\/x.com\/pi3g"]},{"@type":"Person","@id":"https:\/\/picockpit.com\/raspberry-pi\/#\/schema\/person\/e38fef75134e5e54175b2615a8c3eb47","name":"Nathan Busler","image":{"@type":"ImageObject","inLanguage":"sv-SE","@id":"https:\/\/secure.gravatar.com\/avatar\/93fef66631dac0f47ce2c90f774cd4e4fe44028ea5266602e20fbf246f7d14f9?s=96&d=blank&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/93fef66631dac0f47ce2c90f774cd4e4fe44028ea5266602e20fbf246f7d14f9?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/93fef66631dac0f47ce2c90f774cd4e4fe44028ea5266602e20fbf246f7d14f9?s=96&d=blank&r=g","caption":"Nathan Busler"},"sameAs":["https:\/\/buyzero.de"],"url":"https:\/\/picockpit.com\/raspberry-pi\/sv\/author\/nathan\/"}]}},"_links":{"self":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/posts\/2208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/comments?post=2208"}],"version-history":[{"count":13,"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/posts\/2208\/revisions"}],"predecessor-version":[{"id":5347,"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/posts\/2208\/revisions\/5347"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/media\/5345"}],"wp:attachment":[{"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/media?parent=2208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/categories?post=2208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/picockpit.com\/raspberry-pi\/sv\/wp-json\/wp\/v2\/tags?post=2208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}