<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Why Use SPI Drivers?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/80ca780e26/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Runtime/thread/80ca780e26/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Runtime/thread/80ca780e26/</id><updated>2021-08-20T06:30:45.837000Z</updated><subtitle>Recent posts to Why Use SPI Drivers?</subtitle><entry><title>Why Use SPI Drivers?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/80ca780e26/?limit=25#eb1b" rel="alternate"/><published>2021-08-20T06:30:45.837000Z</published><updated>2021-08-20T06:30:45.837000Z</updated><author><name>ojz0r</name><uri>https://forge.codesys.com/u/ojz0r/</uri></author><id>https://forge.codesys.comb2bfa6d3171acbdaec73bd55e7597365672dbe25</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;XML file + Library would be one way if you want to hard code a driver.&lt;/p&gt;
&lt;p&gt;Otherwise you can do it in logic using the method "SPI_master.transferExt(...)". Then you can define what you want to send and receive at runtime.&lt;br/&gt;
For example, the messages sent/received will be different for the MCP23017 (Microchip 16xGPIO chip) and MCP3208 (Microchip 8xADC inputs).&lt;br/&gt;
Look at the example project "PiFace_FB.project" to see how it is used. It  is very flexible.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Why Use SPI Drivers?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/80ca780e26/?limit=25#7ed3/bb06" rel="alternate"/><published>2021-08-19T22:23:54.443000Z</published><updated>2021-08-19T22:23:54.443000Z</updated><author><name>bwayt</name><uri>https://forge.codesys.com/u/bwayt/</uri></author><id>https://forge.codesys.com39f3bba08dba0b5ede20532b13d474a906a9236f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Yeah, both using the same SPI driver sounds right: I'm sure when you state your device that Codesys makes certain assumptions about how comm protocols will be handled.&lt;br/&gt;
By "soft drivers", do you mean drivers specified through an XML file + Library? &lt;br/&gt;
I'm still not sure as to why we use such roundabout methods when RPI4 has its own SPI library to use; not like the buffer board has anything special about the way it sends its bytes.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Why Use SPI Drivers?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/80ca780e26/?limit=25#7ed3" rel="alternate"/><published>2021-08-19T18:41:52.476000Z</published><updated>2021-08-19T18:41:52.476000Z</updated><author><name>ojz0r</name><uri>https://forge.codesys.com/u/ojz0r/</uri></author><id>https://forge.codesys.com45331ca019d08606f2cd4d8b7558f7d3dd1d89bf</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I might be wrong but i am fairly sure codesys is leveraging the same low level linux spi driver as the python library does.&lt;br/&gt;
A driver for codesys would be equal to the library for python.&lt;/p&gt;
&lt;p&gt;However there are very flexible drivers that lets you define the protocol yourself to write "soft" drivers in plc code and then feed it to a function.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Why Use SPI Drivers?</title><link href="https://forge.codesys.com/forge/talk/Runtime/thread/80ca780e26/?limit=25#1376" rel="alternate"/><published>2021-08-19T16:09:03.662000Z</published><updated>2021-08-19T16:09:03.662000Z</updated><author><name>bwayt</name><uri>https://forge.codesys.com/u/bwayt/</uri></author><id>https://forge.codesys.com51b7c372d7ab3ded0d2d9b43677deff63feaacba</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;A bit of background: I have a LS7366R buffer board (Link: &lt;a href="https://lsicsi.com/datasheets/LS7366R.pdf" rel="nofollow"&gt;https://lsicsi.com/datasheets/LS7366R.pdf&lt;/a&gt;) that I have successfully established SPI connection with on Arduino and Raspberry Pi 4B (via Python's spidev library). &lt;br/&gt;
I am now trying to establish the same SPI comm via Codesys, but noticed that you must have a SPI device driver for your slave (there's posts about writing your own device drivers, but I feel out of my depth in that regard). &lt;br/&gt;
My question is: &lt;em&gt;why&lt;/em&gt; do I need to specify a driver for this SPI device? What did spidev handle that Codesys' SPI doesn't?&lt;br/&gt;
And: if I can't write my own driver, what other options do I have?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>